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
• 1,362 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Please read the error message. It tells you where the error is and what you need to do. And run
?mergeBamto understand the function.