Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Modifying bam file sequence names according to 2nd column

    Hi,

    I want to modify the sequence names in my bam file. They're supposed to be for paired end, but the names don't have /1 and /2 so I can't use software like bedtools bam2fastq. Anyway, I'd like to add /1 to the end of the name if the flag in the second column is 99 or 83 and then /2 if its 163 or 147. For instance

    Code:
    HSQ1008:141:D0CC8ACXX:3:2202:1520:59984 163     chr14   105899906       60      101M    =       105900110       305     CCTTTCCAGGAAAGGGAGTAGCGAGGCTGCTCACTTAGAGCCACGCACCTGGGGCTGACAGTGTGCCTGGCAGTACCTGTGTGGAAAGACAGTTACAGAGG   @C@DDFDDHHHHAHGBHG1AFHIGIJGIIGEIJIGIFE?BBGIIIIBHIEGHHHFFFEEEEEEDCCCCCDDCD?CACCDDDCBB@ACBC?CCDCCCACAC8   RG:Z:NA12877    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:101
    should become

    Code:
    HSQ1008:141:D0CC8ACXX:3:2202:1520:59984/2 163     chr14   105899906       60      101M    =       105900110       305     CCTTTCCAGGAAAGGGAGTAGCGAGGCTGCTCACTTAGAGCCACGCACCTGGGGCTGACAGTGTGCCTGGCAGTACCTGTGTGGAAAGACAGTTACAGAGG   @C@DDFDDHHHHAHGBHG1AFHIGIJGIIGEIJIGIFE?BBGIIIIBHIEGHHHFFFEEEEEEDCCCCCDDCD?CACCDDDCBB@ACBC?CCDCCCACAC8   RG:Z:NA12877    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:101
    How should I go about this? The bam file is also missing header information. Thanks!

Latest Articles

Collapse

  • seqadmin
    Strategies for Sequencing Challenging Samples
    by seqadmin


    Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
    03-22-2024, 06:39 AM
  • seqadmin
    Techniques and Challenges in Conservation Genomics
    by seqadmin



    The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

    Avian Conservation
    Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
    03-08-2024, 10:41 AM

ad_right_rmr

Collapse

News

Collapse

Topics Statistics Last Post
Started by seqadmin, Yesterday, 06:37 PM
0 responses
8 views
0 likes
Last Post seqadmin  
Started by seqadmin, Yesterday, 06:07 PM
0 responses
8 views
0 likes
Last Post seqadmin  
Started by seqadmin, 03-22-2024, 10:03 AM
0 responses
49 views
0 likes
Last Post seqadmin  
Started by seqadmin, 03-21-2024, 07:32 AM
0 responses
67 views
0 likes
Last Post seqadmin  
Working...
X