Hi,
I'm trying to pipe the following commands for ChipSeq analysis:
${bowtie2_source} -x ${ref_genome} -U ${fastq_file} -S - | ${samtools} view -Shub - | ${samtools} sort - | ${samtools} rmdup -S - - ${target_dir}/${sample_name}.bam
Up till the sorting part it works fine, but in the end, no bam file is created and it gives me the message:
[bam_rmdup] input SAM does not have header. Abort!
What is the problem? and How should I fix it?
Thanks!
What have you tried? Have you tried running each step individually and then changed parameters before the step where it goes wrong?
Hello Bella_p!Please follow up on your previous thread: C: Error in samtools view
For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.
If you disagree please tell us why in a reply below, we'll be happy to talk about it.
Cheers!EDIT: I was mistaken - you are correct, this is a new question that is sufficiently separated from your question in the previous post. Please accept my apologies. Your question has been reopened.
How come it doesn't fit this site? This is a proper bioinformatic topic in which I haven't got a good answer in my previous post. What does not fit? It is about ChipSep pipeline that I'm struggling with, and this is the perfect site to get help. Please clarify that to me.
Post closing moderator action uses a pre-set text message. I have removed that line from message above (which @Ram forgot to do).
Since this exact question was answered by @Wouter in the other thread you should follow-up on it there.
It wasn't the same question. The first question was answered by other user. Then I asked another question, that did not resolved
Correct. You asked a new question in the thread you already had open (C: Error in samtools view ) due to a new error that came up as a part of continuation of analysis. It is useful to resolve it there as the original thread contains other relevant information (which would need to be repeated here to provide context).
The way this site works best is if new questions are not posted in comments.
Repeating a question originally posted as comment as a new post is the correct course of action.
Did you get an error? Or did the suggestion not work?
In general when this kind of error occurs you should remove one set of command from the end of a set of pipes to backtrack and figure out which step is causing the failure.
The suggestion didn't worked. The problem is with samtools rmdup, since up to samtools sort, it worked fine. But I don't know how to fix it
What about
samtools sort -O BAM
?Apologies - as genomax stated, that message was part of the template. I closed this post so your other post would be the place to go to for someone facing a similar problem. It helps us keep the discussion coherent, and all people that contribute have all the relevant information on the steps that went into resolving the issue.
Please do not go off of the "not relevant" part - that sentence was left in by mistake, and I apologize for that. Let us continue discussing your question in your other post.
No worries! Thank you!
I tried, bur samtools rmdup didn't work. So, I decided in the meantime to end it with samtools sort, and the script that worked for me was:
Has anyone told you that you don't need the
samtools view
step?@Istvan did. In his answer below :-)