Dear all,
I got this problem when using Rsamtools to get data from 1000 Genome Project.
This is exactly the same as is in the manual however it led to errror:
I thought it was because I didn't index it. Hence I downloaded the .bai file and retried:
Still the same error. Anyone knows why? Thanks!
Yuchioj
I got this problem when using Rsamtools to get data from 1000 Genome Project.
Code:
na19240url="ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/pilot_data/data/NA19240/alignment/NA19240.chrom6.SLX.maq.SRP000032.2009_07.bam" which <- GRanges(seqnames ="6", ranges = IRanges(1e+05, 110000)) p <- ScanBamParam(which = which) na19240bam <- scanBam(na19240url, param = p)
Code:
Error in open.BamFile(BamFile(file, index), "rb") : failed to open SAM/BAM file file: 'ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/pilot_data/data/NA19240/alignment/NA19240.chrom6.SLX.maq.SRP000032.2009_07.bam' In addition: Warning messages: 1: In open.BamFile(BamFile(file, index), "rb") : gethost: 11004 2: In open.BamFile(BamFile(file, index), "rb") : select time-out 3: In open.BamFile(BamFile(file, index), "rb") : [kftp_connect_file] 350 Restarting at 0. Send STORE or RETRIEVE to initiate transfer
Code:
download.file("ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/pilot_data/data/NA19240/alignment/NA19240.chrom6.SLX.maq.SRP000032.2009_07.bam.bai","NA19240.chrom6.SLX.maq.SRP000032.2009_07.bam.bai") na19240bam <- scanBam(na19240url, index="NA19240.chrom6.SLX.maq.SRP000032.2009_07.bam", param = p)
Yuchioj
Comment