Is there some wrong with my bam file

34 views
Skip to first unread message

Sajal Sthapit

unread,
Oct 24, 2022, 5:46:07 PM10/24/22
to STITCH imputation
This is the error I get when running STITCH. What is missing in my bam files that STITCH needs? I have used these BAM files sucessfully to generate VCFs before.

[2022-10-24 16:39:41] Program start 
[2022-10-24 16:39:41] Get and validate pos and gen 
[2022-10-24 16:40:08] Done get and validate pos and gen 
[2022-10-24 16:40:08] Get BAM sample names 
Error in convert_sam_header_rg_tags_to_sample_name(header = header, file = file) : There is no RG tag with sample name in file:/fastscratch/sthapit/chop.0.1x/05_indexed/C10_000101_sorted.bam

Thank you.

Sajal

Robbie Davies

unread,
Oct 26, 2022, 6:48:32 AM10/26/22
to Sajal Sthapit, STITCH imputation
Hi Sajal,

So it's missing the sample name. You have two options (I think). 

First option, which I think should work. You can supply sampleNames_file as an argument to STITCH, which is the path to a file with one row per bam in bamlist, with the desired sample name for that bam. 

Otherwise, second option, which definitely should work, is to re-header your bams and add the sample name. 

You can see if your bam files are valid by using a program like 

You can re-header a bam file using a process like the following

Best,
Robbie


--
You received this message because you are subscribed to the Google Groups "STITCH imputation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stitch-imputat...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/stitch-imputation/7d6eb4cd-34bf-4407-aaf7-4d053ec3332dn%40googlegroups.com.

Sajal Sthapit

unread,
Oct 26, 2022, 8:51:50 AM10/26/22
to Robbie Davies, STITCH imputation
Thank you Dr. Davies. These are great workarounds that will make my downstream analysis easier.
Reply all
Reply to author
Forward
0 new messages