[ensembl-dev] The number of spanning reads for all genes

J.vandeVorst at gen.umcn.nl J.vandeVorst at gen.umcn.nl
Mon Nov 19 13:39:11 GMT 2012


Hello Ensemble team,

I was trying to get the number of spanning reads for one gene by using the API and the database homo_sapiens_rnaseq_69-37. I used the following Perl code, but I didn't get any results. The API version I use is 69 and I would like to get the number of spanning reads for all genes. I hope you can help me.

Thank you!

Regards Maartje

use Bio::EnsEMBL::DBSQL::DBAdaptor;

$db = new Bio::EnsEMBL::DBSQL::DBAdaptor(
                 -host =>  'ensembldb.ensembl.org',
                 -port =>  5306,
                 -user =>  'anonymous',
                 -dbname =>  'homo_sapiens_core_69_37',
                 -species => 'Homo_sapiens');
$ga = $db->get_GeneAdaptor();
$gene = $ga->fetch_by_stable_id("ENSG00000109061");
$slice = $gene->slice;
$rnaseqdb = new Bio::EnsEMBL::DBSQL::DBAdaptor(
                 -host =>  'ensembldb.ensembl.org',
                 -port =>  5306,
                 -user =>  'anonymous',
                 -dbname =>  'homo_sapiens_rnaseq_69_37');
$rnaseqsa = $rnaseqdb->get_SliceAdaptor();
$rnaseqslice = $rnaseqsa->fetch_by_name($slice->name);
@transcripts = @{$rnaseqslice->get_all_Transcripts('skeletal_rnaseq')};
foreach my $transcript (@transcripts) {
     foreach my $sf (@{$transcript->get_all_supporting_features()}) {
        #The number of reads that spanned accross the intron
        print STDOUT $sf->hit_name, ' :', $sf->score, "\n";
    }
}




Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629.
The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20121119/17d56aa6/attachment.html>


More information about the Dev mailing list