[ensembl-dev] Question about subseq()

Mahmood Naderan mahmood.nt at gmail.com
Fri Jun 30 08:36:12 BST 2017


Hello,
I assume that the line
Location   Chromosome 20: 3,208,063-3,219,836 reverse strand.

in [1] is the same as

my $slice = $slice_adaptor->fetch_by_region( 'chromosome', '20' );
$sequence = $slice->subseq( 3208063, 3219836 );
print $sequence, "\n";

But the output of that script is not the same as the web page. I assume
that 3208063 is  "relative to start of slice" according to the manual [2].

Any thought?

The following code

my $coord_sys  = $slice->coord_system()->name();my $seq_region =
$slice->seq_region_name();my $start      = $slice->start();my $end
   = $slice->end();my $strand     = $slice->strand();
print "Slice: $coord_sys $seq_region $start-$end ($strand)\n";


returns
Slice: chromosome 20 1-63025520 (1)



If I use
my $slice = $slice_adaptor->fetch_by_gene_stable_id( 'ENSG00000088836' );

I get
Slice: chromosome 20 3208063-3219836 (1)

which is correct.


[1] http://grch37.ensembl.org/Homo_sapiens/Gene/Sequence?db=core
;g=ENSG00000088836;r=20:3208063-3219836
[2] http://www.ensembl.org/info/docs/Doxygen/core-api/classBio_
1_1EnsEMBL_1_1Slice.html#a32e3dc700dc76a7b7450f3664de47d5f

Regards,
Mahmood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20170630/ad549a54/attachment.html>


More information about the Dev mailing list