You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using bio::io::gff to read gff files. I would like to get all the cross-references of mRNA associated to the Dbxref attribute, however I was unable to get more than the first cross-reference.
It seems that I get the first element of the array and not the array itself.
An example of code :
extern crate bio;
use bio::io::gff;
fn main() {
let mut reader = gff::Reader::from_file("test.gff",gff::GffType::GFF3).unwrap();
for result in reader.records() {
let record = result.expect("Error during gff record parsing");
if record.feature_type() == "mRNA" {
println!("Attributes = {:?}",record.attributes());
println!("Dbxref = {:?}",record.attributes().get("Dbxref"));
}
}
}
With the following input:
NC_000001.11 BestRefSeq mRNA 65419 71585 . + . ID=rna-NM_001005484.2;Parent=gene-OR4F5;Dbxref=Ensembl:ENST00000641515.2,GeneID:79501,GenBank:NM_001005484.2,HGNC:HGNC:14825;Name=NM_001005484.2;gbkey=mRNA;gene=OR4F5;product=olfactory receptor family 4 subfamily F member 5;tag=MANE Select;transcript_id=NM_001005484.2
Hello,
I am using bio::io::gff to read gff files. I would like to get all the cross-references of mRNA associated to the Dbxref attribute, however I was unable to get more than the first cross-reference.
It seems that I get the first element of the array and not the array itself.
An example of code :
With the following input:
NC_000001.11 BestRefSeq mRNA 65419 71585 . + . ID=rna-NM_001005484.2;Parent=gene-OR4F5;Dbxref=Ensembl:ENST00000641515.2,GeneID:79501,GenBank:NM_001005484.2,HGNC:HGNC:14825;Name=NM_001005484.2;gbkey=mRNA;gene=OR4F5;product=olfactory receptor family 4 subfamily F member 5;tag=MANE Select;transcript_id=NM_001005484.2
I got the following output
I tried several ways to get an array instead of the first string of the array, unsuccessfully...
thanks a lot for any help!
all the best,
simon
The text was updated successfully, but these errors were encountered: