[ensembl-dev] Cannot get sequence from genome using perl variables (no HTML)

Damian dfermin at umich.edu
Wed Apr 27 17:28:45 BST 2011


Doh!!!
Thanks.
Sorry to have bothered everyone with this.

Damian




On 04/27/2011 12:16 PM, Daniel Sobral wrote:
> That's because there's a typo in $slice_adpator . try with 
> $slice_adaptor instead
> You would have detected that, if you added
> use warnings;
> use strict;
> at the top of your perl script...
>
> I would suggest a quick read on an Perl introductory book before 
> trying to move deeper into using the API.
>
> Cheers,
> Daniel
>
> On 27/04/2011 17:00, Damian wrote:
>> $coords = "1,724572,724726";
>> @ary = split(/,/, $coords);
>> $chr = $ary[0];
>> $e_start = $ary[1];
>> $e_end = $ary[2];
>>
>> ## get the sequence coordinates.
>> print STDERR "$coords\n";
>> print STDERR "|$chr|\n";
>> print STDERR "|$e_start|\n";
>> print STDERR "|$e_end|\n";
>>
>> $slice = $slice_adpator->fetch_by_region( 'chromosome', $chr, 
>> $e_start, $e_end );
>> $x = $slice->seq;
>> print "\n$x\n"; 
>
>
>

-- 
------------------------------------------------------------------------------
Damian Fermin, Ph.D.
Pathology Department
University of Michigan
4237 Medical Science I
1301 Catherine
Ann Arbor, MI 48109-0602
734.615.0302

"There is No Gene for the Human Spirit"
	-- GATTACA
------------------------------------------------------------------------------





More information about the Dev mailing list