Filtering sam or bam file with maximum matching region
Hi all,
I am analysing NGS amplicon reads of crisper gene samples. I do not know exactly which genes do they belong to because if I align reads against gene sequence (that was supposed to be) using BWA it gives 0% identity however by aligning reference genome I get 99% alignment rate. Now how can I find about the gene through reads data. Is there any way to find through sam or bam file that which chromosomal position are maximum reads aligning to?
Thanks
• 1,826 views
•
link
1 answer
. Is there any way to find through sam or bam file that which chromosomal position are maximum reads aligning to?
samtools depth in.bam | awk -F '\t' 'BEGIN{BEST_DEPTH=0;BEST="";} {DEPTH=int($3);if(BEST_DEPTH<DEPTH) {BEST_DEPTH=DEPTH;BEST=$0;} } END{print BEST;}'
• 0 views
•
link
Log in to answer this question.