Question: Input own BAM files
gravatar for siangoldie
19 months ago by
siangoldie0 wrote:


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??

atacseqqc input bam R • 813 views
ADD COMMENTlink modified 19 months ago by genomax72k • written 19 months ago by siangoldie0

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 REPLYlink written 19 months ago by swbarnes26.7k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1157 users visited in the last hour