Input own BAM files
0
0
Entering edit mode
6.1 years ago
siangoldie • 0

Hi,

I'm trying to run a package called ATACseqQC, which already has an example bamfile within the package. However I'm wanting to run the package with my own BAM files. I'm new to using R, so I've probably done this completely wrong... I first loaded the Rsamtools library, and then tried to import my own bamfile using:

> bamfile <- file.path("D:", "Sian", "SG1_S46_ATAC_trimmoPE_bowtie2_dm6_PP_Q30_sorted_BASE.bam")

The error message returned is

Error in value[[3L]](cond) : 
  failed to open BamFile: failed to load BAM index
  file: D:/Sian/SG1_S46_ATAC_trimmoPE_bowtie2_dm6_PP_Q30_sorted_BASE.bam
In addition: Warning message:
In doTryCatch(return(expr), name, parentenv, handler) :
  [bam_index_load] fail to load BAM index.

I then tried to index using:

> samtools index SG1_S46_ATAC_trimmoPE_bowtie2_dm6_PP_Q30_sorted_BASE.bam

Returned another error message:

Error: unexpected symbol in "samtools index"

I'm really stuck can anyone help please??

R BAM input ATACseqQC • 2.4k views
ADD COMMENT
2
Entering edit mode

Are you trying to run samtools in R? The command you wrote should work fine in Unix, but probably not for Rsamtools, if that's what you are are trying to use.

ADD REPLY

Login before adding your answer.

Traffic: 2555 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6