Filtering unmapped reads from BAM files
0
1
Entering edit mode
16 months ago

I am applying the GATK best practices for variant calling pipeline.

By applying the picard addOrReplaceReadGroups I got the error: "invalid_mapping_quality", I read the post Final Solution For "Mapq Should Be 0 For Unmapped Read.". So decided to remove unmapped reads with samtools view -bF 4.

My question is since I will apply the GATK base recalibrator, is it better to set QC = 0 to the reads that are unmapped and how would I do this? Or removing them is the best practice?

Best Regards, Manuel

BAM GATK • 845 views
ADD COMMENT
0
0
Entering edit mode

Thanks! Is there any flag for ignoring this error with picard addOrReplaceReadGroups? And for example for estimating TMB from BAM files would it be a problem?

ADD REPLY
0
Entering edit mode

try

VALIDATION_STRINGENCY=LENIENT


ADD REPLY
0
Entering edit mode

I did this:

srun /mnt/beegfs/apptainer/images/picard_latest.sif java -XX:ParallelGCThreads=40 -jar 
/usr/picard/picard.jar AddOrReplaceReadGroups  -I "$SORTED_BAM" -O "$OUTPUT" -RGID 4 - 
RGLB lib1 -RGPL ILLUMINA -RGPU unit1 -RGSM 20 -VALIDATION_STRINGENCY "LENIENT"

It generated the output file but still showed error. I proceded with doing the next step picard MarkDuplicates with the same flag "-VALIDATION_STRINGENCY ", error was displayed again yet it generated output? Should I keep adding this flag for the rest of the pipeline whenever use picard?

ADD REPLY

Login before adding your answer.

Traffic: 1204 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6