|
From: Josep I. L. L. <jos...@in...> - 2012-06-29 06:34:38
|
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. |