Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tectona
    Member
    • Feb 2011
    • 11

    #1

    Locating individual reads in alignment

    I have used 100 nt paired-end sequences to construct a reduced representation reference genome of the organism I am working with. I aligned the reads back to the reference genome. I hope to find SNPs at some point. I have a list of individual reads (with the paired read) which I would like to inspect in the alignment. Is there a way to find out what position in the reference genome these reads are aligned to? I can visualize the aligned reads in IGV and there I can zoom in to a position to inspect a region. But I cannot search for a particular read - I need to know the map position of the read first. Is there a programme of script that could extract the position (and maybe other infrmation) of an individual read from a sam/bam file?
    Last edited by Tectona; 01-16-2012, 03:33 AM. Reason: typo
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    Presumably you have the SAM file that was output from the aligner. You can look for the location of a read in it using grep: grep -m 1 -w SomeReadName.123455 Aligned.sam

    That'll be easy enough provided you only have a few reads you want to look at,

    Comment

    • maubp
      Peter (Biopython etc)
      • Jul 2009
      • 1544

      #3
      Tablet lets you search for reads by name, the regular expression support is also very handy: http://bioinf.hutton.ac.uk/tablet/

      Comment

      • Tectona
        Member
        • Feb 2011
        • 11

        #4
        Originally posted by dpryan View Post
        Presumably you have the SAM file that was output from the aligner. You can look for the location of a read in it using grep: grep -m 1 -w SomeReadName.123455 Aligned.sam

        That'll be easy enough provided you only have a few reads you want to look at,

        Thanks for the suggestion. However, when I use the command grep -m 1 Sequence_read_tag alignment_file.sam > output.txt

        I get the following information:
        FCB020AACXX:6:1305:20474:84915#ATGAACCT 163 369552-8 1 60 100M = 61 160 CTTGCAAAGGAAAATCTTGAGATGAACGAGGGCGACATTAGCAAGGAGGCCATCGGAGGCACCGACGGTACCACCGTCGATGGAGAGGATGCGAACCCAT bbbeeeeeggggfiiiiiiiihgifhihffhiiiiihiihiihfghfhiihggggeeecccccccccc]acccccc_acacccccccccccccccccccc XT:A:U NM:i:0 SM:i:37 AM:i:37 X0:i:1 X1:i:0 XM:i:0 XO:i:0 XG:i:0 MD:Z:100

        I recognize the name of my sequence, the sequence itself, the quality information... but where do I find the positional information?

        Comment

        • Tectona
          Member
          • Feb 2011
          • 11

          #5
          Originally posted by maubp View Post
          Tablet lets you search for reads by name, the regular expression support is also very handy: http://bioinf.hutton.ac.uk/tablet/
          Thanks for the suggestion. Tablet looks like a nice programme. And indeed, it lets you search for the name of an individual sequence. However, is there a way to display more than a single set of sequence reads? As far as I have been able to explore the programme, I do not see a way to import more than one set of reads aligned to a reference at a time... I would like to compare two or more sets of reads aligned to the same reference sequence.

          Comment

          • dpryan
            Devon Ryan
            • Jul 2011
            • 3478

            #6
            Originally posted by Tectona View Post
            Thanks for the suggestion. However, when I use the command grep -m 1 Sequence_read_tag alignment_file.sam > output.txt

            I get the following information:
            FCB020AACXX:6:1305:20474:84915#ATGAACCT 163 369552-8 1 60 100M = 61 160 CTTGCAAAGGAAAATCTTGAGATGAACGAGGGCGACATTAGCAAGGAGGCCATCGGAGGCACCGACGGTACCACCGTCGATGGAGAGGATGCGAACCCAT bbbeeeeeggggfiiiiiiiihgifhihffhiiiiihiihiihfghfhiihggggeeecccccccccc]acccccc_acacccccccccccccccccccc XT:A:U NM:i:0 SM:i:37 AM:i:37 X0:i:1 X1:i:0 XM:i:0 XO:i:0 XG:i:0 MD:Z:100

            I recognize the name of my sequence, the sequence itself, the quality information... but where do I find the positional information?
            It's the 4th field, so position 1 in this case. If you just want the contig and position displayed then you can use something like the following:
            Code:
            grep -m 1 Sequence_read_tag alignment_file.sam | awk '{ print $3":"$4 }' > output.txt
            The output will then be "contig: position" (without the space, for some reason the forum turns colon p into an emoticon).

            Comment

            • Tectona
              Member
              • Feb 2011
              • 11

              #7
              OK, thanks, now I got it figured out...
              Last edited by Tectona; 01-17-2012, 01:41 AM. Reason: Too early reaction

              Comment

              • dpryan
                Devon Ryan
                • Jul 2011
                • 3478

                #8
                That's position according to the reference contig it's aligned against. You may want to browse the SAM specification. The read you showed maps to the start of a contig.

                Comment

                Latest Articles

                Collapse

                • SEQadmin2
                  Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
                  by SEQadmin2



                  Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

                  Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
                  ...
                  10-14-2026, 09:55 AM
                • SEQadmin2
                  New Genomics Technologies Take Aim at Long-Standing Limits
                  by SEQadmin2


                  Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

                  We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
                  ...
                  09-28-2026, 10:25 AM

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by SEQadmin2, Yesterday, 11:13 AM
                0 responses
                19 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, Yesterday, 10:48 AM
                0 responses
                18 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 10-15-2026, 10:52 AM
                0 responses
                36 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 10-14-2026, 05:39 AM
                0 responses
                42 views
                0 reactions
                Last Post SEQadmin2  
                Working...