-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in filterPrecursorScan() #194
Comments
I think the cleanest solution would be to add an argument If OK I would implement that - and ask you @lgatto to confirm the results to be correct then. |
- Add parameter `f = dataOrigin(object)` to `filterPrecursorScan` to allow filtering within each sample/file. This fixes issue #194.
fix: per-file filtering in filterPrecursorScan (issue #194)
Then I guess we can close the issue now. |
This bug isn't fixed. Using the default > library(rpx)
> PXD022816 <- PXDataset("PXD022816")
Loading PXD022816 from cache.
> (mzmls <- pxget(PXD022816, grep("mzML", pxfiles(PXD022816))[1:2]))
[1] "/home/lgatto/.cache/R/rpx/3e55cc6b3df7f9_QEP2LC6_HeLa_50ng_251120_01-calib.mzML"
[2] "/home/lgatto/.cache/R/rpx/3e55cc7a53b04f_QEP2LC6_HeLa_50ng_251120_02-calib.mzML"
> sp <- Spectra(mzmls)
> (sp2 <- filterPrecursorScan(sp, 2490))
MSn data (Spectra) with 4 spectra in a MsBackendMzR backend:
msLevel rtime scanIndex
<integer> <numeric> <integer>
1 1 915.757 2486
2 2 916.293 2490
3 1 915.252 2485
4 2 915.876 2490
... 33 more variables/columns.
file(s):
3e55cc6b3df7f9_QEP2LC6_HeLa_50ng_251120_01-calib.mzML
3e55cc7a53b04f_QEP2LC6_HeLa_50ng_251120_02-calib.mzML
Processing:
Filter: select parent/children scans for 2490 [Fri Apr 7 23:57:32 2023] But of I want to get the results for one file, the > filterPrecursorScan(sp, 2490, f = "/home/lgatto/.cache/R/rpx/3e55cc6b3df7f9_QEP2LC6_HeLa_50ng_251120_01-calib.mzML")
MSn data (Spectra) with 4 spectra in a MsBackendMzR backend:
msLevel rtime scanIndex
<integer> <numeric> <integer>
1 1 915.757 2486
2 2 916.293 2490
3 1 915.252 2485
4 2 915.876 2490
... 33 more variables/columns.
file(s):
3e55cc6b3df7f9_QEP2LC6_HeLa_50ng_251120_01-calib.mzML
3e55cc7a53b04f_QEP2LC6_HeLa_50ng_251120_02-calib.mzML
Processing:
Filter: select parent/children scans for 2490 [Fri Apr 7 23:59:34 2023] Indeed, looking at this line, if does get ignored. If I change it, passing > filterPrecursorScan(sp, 2490, f = "/home/lgatto/.cache/R/rpx/3e55cc6b3df7f9_QEP2LC6_HeLa_50ng_251120_01-calib.mzML")
Error in i2index(i, length(x), rownames(x@spectraData)) :
if i is logical it has to match the length of the object (58907)
In addition: Warning message:
In x[i] <- value[[j]] :
number of items to replace is not a multiple of replacement length |
Issues
filterDataOrigin()
if I wanted to extract the set from a single file.and
Suggested workarounds
filterPrecursorScan()
only work with a data from a single data origin ( 👎🏻 )dataOrigin
argument (that can be omitted when there's only a single data origin) that needs to be same length at the acquisition number ( 👍🏻 )@sgibb @jorainer - any comments/suggestions?
The text was updated successfully, but these errors were encountered: