Hi All,
I need some help I want to pipe the output from samtools to picard read group commands but I am failing:
bowtie2 -x bowtie2_index_hg38 -1 R1.fq.gz -2 R2.fq.gz | samtools view -Shb - | samtools sort - output
What I want to achieve is the following is to also add the read groups the output.bam file from above command and also index the output bam file with reads groups. I am failing with the following command and I don't know how to also index the output bam file that has the read group.
bowtie2 \
-x bowtie2_index_hg38 \
-1 mrg_sample_1_R1_val_1.fq \
-2 mrg_sample_1_R2_val_2.fq | \
samtools view -Shb - | \
samtools sort - - | \
picard AddOrReplaceReadGroups \
I= output.bam \
O=rg_output.bam \
RGID=sample_1 \
RGLB=sample_1 \
RGPL=illumina_hi-seq \
RGPU=sample_1 \
RGSM=sample_1
Can someone please help me?
Thanks,
Yaseen
Hello yaseen.ladak!
It appears that your post has been cross-posted to another site: Don't cross-post on here and the samtools mailing list.
This is typically not recommended as it runs the risk of annoying people in both communities.
Hi Devon,
MY apologies I am very new to using these forums. I will keep in mind.
Thanks,
Yaseen
cross posted here too: http://gatkforums.broadinstitute.org/discussion/6471
Hi Devon and every one,
Thank you very much. it works now. I will also keep in mind not to post in samtools and here as you mentioned. I am very new to this, I thought if someone would reply I will get an email. Is there a setting biostar if someone replies to my post I get an email?
Thanks,
Yaseen
Sorry, just managed to change my setting in my profile about the email. My apologies, I should have looked better for this option in my profile setting.