Skip to content

Instantly share code, notes, and snippets.

@ionox0
Created October 5, 2018 18:22
Show Gist options
  • Save ionox0/ba1967b475a529d1525bebc5ccab7e83 to your computer and use it in GitHub Desktop.
Save ionox0/ba1967b475a529d1525bebc5ccab7e83 to your computer and use it in GitHub Desktop.
Indel Realignment comparison
# Compare first 11 fields of bam files
diff <(samtools view 5500-FC-FGFR2-spike-in/Sample_ML-fgfr2-015-pl-T02_/ML-fgfr2-015-pl-T02_IGO_05500_FC_16_S16_001_cl_aln_srt_MD_IR_FX_BR.bam | cut -f1-11 ) <(samtools view repeat-run/5500-FC-FGFR2-spike-in/Sample_ML-fgfr2-015-pl-T02_/ML-fgfr2-015-pl-T02_IGO_05500_FC_16_S16_001_cl_aln_srt_MD_IR_FX_BR.bam | cut -f1-11 ) > ~/ML-fgfr2-015-pl-T02_IGO_05500_FC_16_S16_001_cl_aln_srt_MD_IR_FX_BR-complete_diff-original_vs_repeat-run
# Compare IR reads (grep for "YO:" tag)
diff <(samtools view 5500-FC-FGFR2-spike-in/Sample_ML-fgfr2-015-pl-T02_/ML-fgfr2-015-pl-T02_IGO_05500_FC_16_S16_001_cl_aln_srt_MD_IR_FX_BR.bam | grep "YO:") <(samtools view repeat-run/5500-FC-FGFR2-spike-in/Sample_ML-fgfr2-015-pl-T02_/ML-fgfr2-015-pl-T02_IGO_05500_FC_16_S16_001_cl_aln_srt_MD_IR_FX_BR.bam | grep "YO:") > ~/ML-fgfr2-015-pl-T02_IGO_05500_FC_16_S16_001_cl_aln_srt_MD_IR_FX_BR-indel_realign_diff-original_vs_repeat-run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment