Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • me91
    Member
    • Aug 2012
    • 15

    reads position in reference sequence(sam file)

    Hi all,

    there are some reads aligned. the .sam output file produced using bowtie, is like bellow and i want to extract aligned reads and their mapped positions on reference cromosome. I have read similar threads and found a sra format description but there are some differences! i need the position in reference sequence where each read has mapped.

    @HD VN:1.0 SO:unsorted
    @SQ SN:gi|224384765|gb|CM000666.1| LN:191154276
    @PG ID:Bowtie VN:0.12.8 CL:"bowtie -q -n 3 -e 100 -l 50 -y -S -p 8 D:\a\index\ch4indexed D:\a\SRR017963.fastq D:\a\output_file.sam"
    SRR017963.1 HWI-EAS153_5_30KE6AAXX:2:1:105:2042 length=76 4 * 0 0 * * 0 0 GTNNNTTNTTCTTGTGNTTTGAATTTAACCATGGAAGACAGTGATGGTGTAACTTATGCATTAAAGTGTGACAGTA :6!!!::!::::::::!:::::::::::::7777711131311331131111/13111101013/0/0111111/0 XM:i:0
    SRR017963.3 HWI-EAS153_5_30KE6AAXX:2:1:194:1662 length=76 4 * 0 0 * * 0 0 GAATGCAATCATCATCGCACAGAATCGAATGGAATCATCGAATGGACTCGAATGGAATAATCATTGAACGGAATCG :7:21::60:71-1:--&:0:4440(3::310372&*/.2'-66/3+023/.,226-3323+2'02.,262323,2 XM:i:0


    thanks for any advice.
  • kmcarr
    Senior Member
    • May 2008
    • 1181

    #2
    Originally posted by me91 View Post
    Hi all,

    there are some reads aligned. the .sam output file produced using bowtie, is like bellow and i want to extract aligned reads and their mapped positions on reference cromosome. I have read similar threads and found a sra format description but there are some differences! i need the position in reference sequence where each read has mapped.

    Code:
    @HD	VN:1.0	SO:unsorted
    @SQ	SN:gi|224384765|gb|CM000666.1|	LN:191154276
    @PG	ID:Bowtie	VN:0.12.8	CL:"bowtie -q -n 3 -e 100 -l 50 -y -S -p 8 D:\a\index\ch4indexed D:\a\SRR017963.fastq D:\a\output_file.sam"
    SRR017963.1 HWI-EAS153_5_30KE6AAXX:2:1:105:2042 length=76	4	*	0	0	*	*	0	0	GTNNNTTNTTCTTGTGNTTTGAATTTAACCATGGAAGACAGTGATGGTGTAACTTATGCATTAAAGTGTGACAGTA	:6!!!::!::::::::!:::::::::::::7777711131311331131111/13111101013/0/0111111/0	XM:i:0
    SRR017963.3 HWI-EAS153_5_30KE6AAXX:2:1:194:1662 length=76	4	*	0	0	*	*	0	0	GAATGCAATCATCATCGCACAGAATCGAATGGAATCATCGAATGGACTCGAATGGAATAATCATTGAACGGAATCG	:7:21::60:71-1:--&:0:4440(3::310372&*/.2'-66/3+023/.,226-3323+2'02.,262323,2	XM:i:0

    thanks for any advice.
    [Suggestion: when posting long lines of formatted text wrap them in [CODE] tags as I have done with your SAM lines so they will be readable. (Highlight the text you want to format as CODE then click on the hashtag (#) symbol in the formatting bar at the top of the message editor window.)]

    Read the SAM (not SRA) format specification: LMGTFY

    The two example lines you showed don't have a chromosomal position because they are unmapped.

    Comment

    • me91
      Member
      • Aug 2012
      • 15

      #3
      Read the SAM (not SRA) format specification: LMGTFY
      As i said i have read that. but it was explained that Each alignment line has 11 mandatory fields and the 4th field is 1-based leftmost mapping position. but this field is 4 in all my aligned reads!

      Comment

      • kmcarr
        Senior Member
        • May 2008
        • 1181

        #4
        Originally posted by me91 View Post
        As i said i have read that. but it was explained that Each alignment line has 11 mandatory fields and the 4th field is 1-based leftmost mapping position. but this field is 4 in all my aligned reads!
        The fourth field in your line is empty. Fields are separated by tabs; the first field (QNAME or query name) includes the entirety of:
        Code:
        "SRR017963.1 HWI-EAS153_5_30KE6AAXX:2:1:105:2042 length=76"
        SRR017963.1 and 'length-76' is separated by the rest of the ID by a spaces.

        The second field, the FLAG field is '4' which indicates that this was an unpaired read and that it is unmapped. The fourth field is '0' because it's unmapped. The third field (the RNAME or reference name) is '*' because the read is unmapped.
        Last edited by kmcarr; 08-27-2012, 11:45 AM. Reason: If you read this earlier I made a mess of it, misidentifying the fields.

        Comment

        • me91
          Member
          • Aug 2012
          • 15

          #5
          I was wrong counting fields. thank you ...

          Comment

          Latest Articles

          Collapse

          • SEQadmin2
            Nine Things a Sample Prep Scientist Thinks About Before Sequencing
            by SEQadmin2


            I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.


            Here are nine questions we think about, in roughly the order they matter, before...
            06-18-2026, 07:11 AM
          • SEQadmin2
            From Collection to Sequencing: Why Sample Preparation and Preservation Define Sequencing Data
            by SEQadmin2


            Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.


            The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
            ...
            06-02-2026, 10:05 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by SEQadmin2, 06-17-2026, 06:09 AM
          0 responses
          25 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 06-09-2026, 11:58 AM
          0 responses
          42 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 06-05-2026, 10:09 AM
          0 responses
          48 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 06-04-2026, 08:59 AM
          0 responses
          49 views
          0 reactions
          Last Post SEQadmin2  
          Working...