Seqanswers Leaderboard Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • nilshomer
    replied
    Originally posted by bioinfosm View Post
    When the flag field is '*', does it mean an unmapped read? I know that a flag 4 is definitely unmapped.
    The '*' in the flag field is invalid, and does not conform to the specification (see the "Note" in Section 2.2.1).

    Leave a comment:


  • bioinfosm
    replied
    When the flag field is '*', does it mean an unmapped read? I know that a flag 4 is definitely unmapped.

    Leave a comment:


  • nilshomer
    replied
    Originally posted by rcorbett View Post
    Hi all,
    I have a bam file created from illumina alignments with bwa. When I try to get the number of aligned reads 2 different ways I get 2 different numbers...

    When I run flagstat:
    samtools flagstat myBam.bam
    I get this many mapped reads
    41721001 mapped (93.82%)

    However when I try to get this on my own with this command:
    samtools view myBam.bam | awk -F '\t' '($3 != "*")' | wc -l
    I get this number
    42283661

    I'm sure I'm doing something wrong, but not sure what. Is it incorrect to think that all reads with a non '*' listed in the third column should be considered aligned?

    thanks for the help!
    You want:
    Code:
    samtools view -f 4 myBam.bam | wc -l
    See the FLAG field in the SAM spec.

    Leave a comment:


  • rcorbett
    started a topic samtools flagstat mismatch in stats

    samtools flagstat mismatch in stats

    Hi all,
    I have a bam file created from illumina alignments with bwa. When I try to get the number of aligned reads 2 different ways I get 2 different numbers...

    When I run flagstat:
    samtools flagstat myBam.bam
    I get this many mapped reads
    41721001 mapped (93.82%)

    However when I try to get this on my own with this command:
    samtools view myBam.bam | awk -F '\t' '($3 != "*")' | wc -l
    I get this number
    42283661

    I'm sure I'm doing something wrong, but not sure what. Is it incorrect to think that all reads with a non '*' listed in the third column should be considered aligned?

    thanks for the help!

Latest Articles

Collapse

  • seqadmin
    Pathogen Surveillance with Advanced Genomic Tools
    by seqadmin




    The COVID-19 pandemic highlighted the need for proactive pathogen surveillance systems. As ongoing threats like avian influenza and newly emerging infections continue to pose risks, researchers are working to improve how quickly and accurately pathogens can be identified and tracked. In a recent SEQanswers webinar, two experts discussed how next-generation sequencing (NGS) and machine learning are shaping efforts to monitor viral variation and trace the origins of infectious...
    03-24-2025, 11:48 AM
  • seqadmin
    New Genomics Tools and Methods Shared at AGBT 2025
    by seqadmin


    This year’s Advances in Genome Biology and Technology (AGBT) General Meeting commemorated the 25th anniversary of the event at its original venue on Marco Island, Florida. While this year’s event didn’t include high-profile musical performances, the industry announcements and cutting-edge research still drew the attention of leading scientists.

    The Headliner
    The biggest announcement was Roche stepping back into the sequencing platform market. In the years since...
    03-03-2025, 01:39 PM
  • seqadmin
    Investigating the Gut Microbiome Through Diet and Spatial Biology
    by seqadmin




    The human gut contains trillions of microorganisms that impact digestion, immune functions, and overall health1. Despite major breakthroughs, we’re only beginning to understand the full extent of the microbiome’s influence on health and disease. Advances in next-generation sequencing and spatial biology have opened new windows into this complex environment, yet many questions remain. This article highlights two recent studies exploring how diet influences microbial...
    02-24-2025, 06:31 AM

ad_right_rmr

Collapse

News

Collapse

Topics Statistics Last Post
Started by seqadmin, 03-20-2025, 05:03 AM
0 responses
41 views
0 reactions
Last Post seqadmin  
Started by seqadmin, 03-19-2025, 07:27 AM
0 responses
46 views
0 reactions
Last Post seqadmin  
Started by seqadmin, 03-18-2025, 12:50 PM
0 responses
36 views
0 reactions
Last Post seqadmin  
Started by seqadmin, 03-03-2025, 01:15 PM
0 responses
191 views
0 reactions
Last Post seqadmin  
Working...