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

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

atacseqqc input bam R • 597 views
ADD COMMENTlink modified 12 months ago by genomax64k • written 12 months ago by siangoldie0
2

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 12 months ago by swbarnes25.0k
Please log in to add an answer.

Help
Access

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