This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Merging Bam Files with Rsamtools

Hi,

I am trying to merge two different bam files with Rsamtools in Rstudio. And this is how I am trying to do it:

mergeBam(files = files[c(3,5)], destination = "O:/ChIPseq_results_files/bam_files/merged_bam_files")

where files is the list of bam files I have in a given directory and 3 and 5 the files I am trying to merge (that is why I write files[c(3,5)]).

However, I am getting back this error:

Error in value[[3L]](cond) : 
  'mergeBam' 'destination' exists, 'overwrite' is FALSE
  destination: O:/ChIPseq_results_files/bam_files/merged_bam_files

Thanks for your assistance

mergebam rsamtools

Please read the error message. It tells you where the error is and what you need to do. And run ?mergeBam to understand the function.

0 answers

No answers yet.

Log in to answer this question.