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