Entering edit mode
6 months ago
Mohamed Samir
▴
30
Dear all,
I have been trying to retrieve the metadata of a particular bioproject using the R tool: BioSampleParser, which is a function that "Angelo: https://github.com/angelolimeta" have made for that purpose. An error pops up :
meta_list$BioSampleSet[[i]]$Attributes[[j]] : subscript out of bounds
and I am not sure if this is due to this bioproject have no metadata or in anything else.
The script for this function is found here: https://github.com/angelolimeta/BioSampleParser/blob/master/src/BioSampleParser.R
My code:
source('E:/05-Learn /R/Scripts/parse biosample data to R/BioSampleParser.R')
df_metadata <- BioSampleParser(query = "508509", file.tsv = 'A.tsv')
The error returned:
Error in meta_list$BioSampleSet[[i]]$Attributes[[j]]:
Subscript out of bounds
Hi, I also had the same problem. If you check its github page there have been no releases for many years and these errors cannot be fixed. This only works for some projects. I recommend you use Entrez-Direct utilities to get the BioSample annotations
Dear marco, We need to ask ourselves why it is not working for all bioprojects ? I have looked into this, and observed that as long as the biosamples included in a project exceeds certain number, it can not be retrieved by the function. I believe but not sure enough if the function can be modified so that this can be fixed ? Do you mean using the Entrez GUI ?
Thanks
Hi Mohamed, I also thought the same thing but we run the risk of inserting other errors perhaps by modifying the function. I tried but I had other errors.. When I talk about Entrez Utilities I am referring to these unix commands: https://www.ncbi.nlm.nih.gov/books/NBK179288/