|
From: Josep I. L. L. <jos...@in...> - 2012-07-24 19:37:05
|
In case anybody is interested, I finally realized that the error is in the 1000genomes servers, which have a hard time to attend too many requests of sliced data from a bam file. So, I followed the recommendation in the following link: http://seqanswers.com/forums/showthread.php?t=13866 Basically, I did not request to download more than one region at a time, and I introduced a delay of 2 seconds before requesting the following region. And it worked. El dv 29 de 06 de 2012 a les 08:34 +0200, en/na Josep Ignasi Lucas Lledo va escriure: > Hello, > > I was very happy to realize that samtools view can read remote files > through ftp. I am downloading some reads from aligned bam files from the > 1000 genomes project, and I realized that every once in a while samtools > view fails to open a bam file. > > The commands that I am using are the following: > > samtools view ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/$j $REGIONS > > samtools view -f 4 ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/$j > > samtools view -H ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/$j > > > The errors or warnings that I am getting are: > > [main_samview] truncated file. > > [kftp_connect_file] 200 Switching to Binary mode. > > [main_samview] fail to open > "ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/technical/pilot2_high_cov_GRCh37_bams/data/NA12878/alignment/NA12878.chrom1.ILLUMINA.bwa.CEU.high_coverage.20100311.bam" for reading. > > [kftp_connect_file] 227 Entering Passive Mode (193,62,193,8,42,120). > > [kftp_connect_file] 350 Restart position accepted (0). > > [bam_index_load] fail to load BAM index. > > If I try to read the remote files that gave the error again, eventually, > they work. Is it normal for this to happen? Is there a way to prevent > the failure? > > Thank you. > > Ignasi. > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Samtools-help mailing list > Sam...@li... > https://lists.sourceforge.net/lists/listinfo/samtools-help |