{"action":"created","issue":{"url":"https://api.github.com/repos/lgatto/synapter/issues/96","labels_url":"https://api.github.com/repos/lgatto/synapter/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/lgatto/synapter/issues/96/comments","events_url":"https://api.github.com/repos/lgatto/synapter/issues/96/events","html_url":"https://github.com/lgatto/synapter/issues/96","id":97320073,"number":96,"title":"bug in new synapter while reading pep3D","user":{"login":"pavel-shliaha","id":1895805,"avatar_url":"https://avatars.githubusercontent.com/u/1895805?v=3","gravatar_id":"","url":"https://api.github.com/users/pavel-shliaha","html_url":"https://github.com/pavel-shliaha","followers_url":"https://api.github.com/users/pavel-shliaha/followers","following_url":"https://api.github.com/users/pavel-shliaha/following{/other_user}","gists_url":"https://api.github.com/users/pavel-shliaha/gists{/gist_id}","starred_url":"https://api.github.com/users/pavel-shliaha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavel-shliaha/subscriptions","organizations_url":"https://api.github.com/users/pavel-shliaha/orgs","repos_url":"https://api.github.com/users/pavel-shliaha/repos","events_url":"https://api.github.com/users/pavel-shliaha/events{/privacy}","received_events_url":"https://api.github.com/users/pavel-shliaha/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lgatto/synapter/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"sgibb","id":1828443,"avatar_url":"https://avatars.githubusercontent.com/u/1828443?v=3","gravatar_id":"","url":"https://api.github.com/users/sgibb","html_url":"https://github.com/sgibb","followers_url":"https://api.github.com/users/sgibb/followers","following_url":"https://api.github.com/users/sgibb/following{/other_user}","gists_url":"https://api.github.com/users/sgibb/gists{/gist_id}","starred_url":"https://api.github.com/users/sgibb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgibb/subscriptions","organizations_url":"https://api.github.com/users/sgibb/orgs","repos_url":"https://api.github.com/users/sgibb/repos","events_url":"https://api.github.com/users/sgibb/events{/privacy}","received_events_url":"https://api.github.com/users/sgibb/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/lgatto/synapter/milestones/1","html_url":"https://github.com/lgatto/synapter/milestones/2.0","labels_url":"https://api.github.com/repos/lgatto/synapter/milestones/1/labels","id":849290,"number":1,"title":"2.0","description":"","creator":{"login":"sgibb","id":1828443,"avatar_url":"https://avatars.githubusercontent.com/u/1828443?v=3","gravatar_id":"","url":"https://api.github.com/users/sgibb","html_url":"https://github.com/sgibb","followers_url":"https://api.github.com/users/sgibb/followers","following_url":"https://api.github.com/users/sgibb/following{/other_user}","gists_url":"https://api.github.com/users/sgibb/gists{/gist_id}","starred_url":"https://api.github.com/users/sgibb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgibb/subscriptions","organizations_url":"https://api.github.com/users/sgibb/orgs","repos_url":"https://api.github.com/users/sgibb/repos","events_url":"https://api.github.com/users/sgibb/events{/privacy}","received_events_url":"https://api.github.com/users/sgibb/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":19,"state":"open","created_at":"2014-11-01T11:05:40Z","updated_at":"2015-07-27T18:23:44Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-07-26T14:04:25Z","updated_at":"2015-07-27T18:23:44Z","closed_at":"2015-07-27T18:23:44Z","body":"Create MSnExp object\r\nReading master identification peptide file...\r\nReading quantitation Pep3D file...\r\nError: You have 52 column names, but 15 columns\r\n\r\nplese have a look (same files as I posted for previous bug)\r\n\r\nZ:\\RAW\\pvs22\\_QTOF_DATA_data3\\data_for_synapter_2.0\\bug\\2015_07_19_problems_with_loading_spectrum\\for_synapter"},"comment":{"url":"https://api.github.com/repos/lgatto/synapter/issues/comments/125295348","html_url":"https://github.com/lgatto/synapter/issues/96#issuecomment-125295348","issue_url":"https://api.github.com/repos/lgatto/synapter/issues/96","id":125295348,"user":{"login":"sgibb","id":1828443,"avatar_url":"https://avatars.githubusercontent.com/u/1828443?v=3","gravatar_id":"","url":"https://api.github.com/users/sgibb","html_url":"https://github.com/sgibb","followers_url":"https://api.github.com/users/sgibb/followers","following_url":"https://api.github.com/users/sgibb/following{/other_user}","gists_url":"https://api.github.com/users/sgibb/gists{/gist_id}","starred_url":"https://api.github.com/users/sgibb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgibb/subscriptions","organizations_url":"https://api.github.com/users/sgibb/orgs","repos_url":"https://api.github.com/users/sgibb/repos","events_url":"https://api.github.com/users/sgibb/events{/privacy}","received_events_url":"https://api.github.com/users/sgibb/received_events","type":"User","site_admin":false},"created_at":"2015-07-27T18:23:44Z","updated_at":"2015-07-27T18:23:44Z","body":"After a discussion with @pavel-shliaha we figured out that he filtered rows with\r\n `df[df$Function != 2,]`. With the filtered file I could reproduce this behaviour.\r\nThe original file (that don't cause this bug) and the filtered file differ in their column names:\r\n```\r\nhead -1 BC_F24_CW_HDMSE_01_Pep3DAMRT.csv BC_F24_CW_HDMSE_01_Pep3DAMRT.orig.csv \r\n==> BC_F24_CW_HDMSE_01_Pep3DAMRT.csv <==\r\n\"Function\",\"spectrumID\",\"isBinned\",\"rt_min\",\"rtErr\",\"mwHPlus\",\"errPPM\",\"charge\",\"Intensity\",\"Counts\",\"errCounts\",\"pep_numIons\",\"clusterID\",\"clust_drift\",\"clust_driftErr\",\"charge_numIons\",\"isFid\",\"ion_ID\",\"ion_z\",\"ion_iso\",\"charge_mwHPlus\",\"ion_rt\",\"ion_rtSd\",\"ion_chFWHM\",\"ion_area\",\"ion_counts\",\"ion_intenSD\",\"ion_m_z\",\"ion_m_zUncal\",\"ion_m_zSD\",\"ion_msFWHM\",\"ion_satFlag\",\"ion_drift\",\"ion_driftFWHM\",\"ion_driftSD\",\"ion_deltaDrift\",\"ion_drSNR\",\"ion_deltaPPM\",\"ion_deltaT\",\"ion_msSNR\",\"ion_chSNR\",\"ion_clusterDeltaPPM\",\"ion_iso_ID\",\"ion_iso_deltaPPM\",\"ion_iso_deltaT\",\"ion_iso_deltaDrift\",\"ion_nonZeroElementCount\",\"ion_centerSumResponse\",\"ion_innerElementCount\",\"ion_ratio12C\",\"Model\",\"ratioToModel\"\r\n\r\n==> BC_F24_CW_HDMSE_01_Pep3DAMRT.orig.csv <==\r\nFunction,spectrumID,isBinned,rt_min,rtErr,mwHPlus,errPPM,charge,Intensity,Counts,errCounts,pep_numIons,clusterID,clust_drift,clust_driftErr,charge_numIons,isFid,ion_ID,ion_z,ion_iso,charge_mwHPlus,ion_rt,ion_rtSd,ion_chFWHM,ion_area,ion_counts,ion_intenSD,ion_m_z,ion_m_zUncal,ion_m_zSD,ion_msFWHM,ion_satFlag,ion_drift,ion_driftFWHM,ion_driftSD,ion_deltaDrift,ion_drSNR,ion_deltaPPM,ion_deltaT,ion_msSNR,ion_chSNR,ion_clusterDeltaPPM,ion_iso_ID,ion_iso_deltaPPM,ion_iso_deltaT,ion_iso_deltaDrift,ion_nonZeroElementCount,ion_centerSumResponse,ion_innerElementCount,ion_ratio12C,Model,ratioToModel\r\n``` \r\nBecause we just want to read columns listed in #87 we read the first line of each csv file and find the index of the corresponding columns. The quotes result in a mismatch (because obviously `Function != \\\"Function\\\"`). \r\nThe source of the problem is that the `quote` argument in `write.table` is `TRUE` (default). `write.csv(..., quote=FALSE)` could fix it.\r\n\r\nNevertheless our import function takes care and removes all quotes before doing the column matching now."}}