I was trying to extract the consensus seq from the particular part of remote BAM file.

I was wondering whether it downloads total bam file or just the part of if which i needed (chr16:1000-1500)?

First few lines of my code is given below.

$sam = Bio::DB::Sam->new(-fasta => '/home/projects/genomes/hu17.fa',

                       -bam   => 'ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/data/HG00116/alignment/HG00116.chrom16.ILLUMINA.bwa.GBR.low_coverage.20100517.bam');

my $segment = $sam->segment('chr16',1000=>1500);

Could you guys suggest me some docs/examples to understand Bio-Samtools better? (I am using this now http://search.cpan.org/~lds/Bio-SamTools-1.10/lib/Bio/DB/Sam.pm)

asked 11 Aug '10, 11:22

culmen's gravatar image

culmen
106517
accept rate: 0%


The perl module largely uses the C API using perl XS. Most functions, including use of an index to fetch subsets of this file, work identically to the C API. Unfortunately, the C API documentation is no more helpful than what you already have.

As indicated in the perldoc you linked to on CPAN, when given a ftp or http URL, Bio::DB::Sam will retrieve the remote index, store it in the current working directory, and proceed to fetch just the subset of the file requested using http/ftp range operations.

link

answered 11 Aug '10, 12:16

jmanning2k's gravatar image

jmanning2k
20111
accept rate: 28%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×13
×8
×4
×1
×1

Asked: 11 Aug '10, 11:22

Seen: 671 times

Last updated: 11 Aug '10, 12:16

powered by OSQA