Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • capricy
    replied
    en. My problem seems to be the missing header

    Thanks for all the replies!!

    Leave a comment:


  • dpryan
    replied
    Originally posted by Brian Bushnell View Post
    I'm pretty sure this works with sam input as well.

    samtools view -f 64 mapped.sam
    Add a -S and that should work.

    Leave a comment:


  • Brian Bushnell
    replied
    I'm pretty sure this works with sam input as well.

    samtools view -Sf 64 mapped.sam
    Last edited by Brian Bushnell; 02-27-2015, 03:18 PM. Reason: Added -S

    Leave a comment:


  • capricy
    replied
    how to extract reads 1 from a sam file

    Hello, there,

    I found that samtools filter function works only for bam file. What if I have a sam file, and I would like to only keep read1 (flag: 64)?

    Do I need to convert this sam file back to bam?

    Thanks!!

    Capricy

    Leave a comment:


  • scami
    replied
    Thanks

    Thanks for the answer. Sam files I am using are very large so an ad hoc C or python script would not be the best option for me. I'll work on it anyway, thanks for the advice

    Leave a comment:


  • dpryan
    replied
    There's no built-in way to do that. If the number of reads in your region of interest is relatively small, then you can "samtools view -F foo.bam region | cut -f 1 > rnames" and then just "samtools view -f 4 foo.bam | grep -f rnames > unmapped_in_region.sam". You could also write a program to do this a bit more efficiently in python (just use a dict of the read names), or just query-sort things and then have the program look for overlaps pair at a time.

    Leave a comment:


  • scami
    started a topic Help with sam flags

    Help with sam flags

    Hi guys
    I would like to ask you a help with the sam format flag. I am using samtools to extract reads from a bam file. Briefly I need to extract all mapped reads in a certain range which is easy to achieve by using the samtools view command. However I need to extract together with the mapped reads also the eventual corresponding unmapped mates.
    How can I do that?
    thanks for the help!

Latest Articles

Collapse

  • 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, 09-29-2026, 09:51 AM
0 responses
40 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, 09-25-2026, 09:06 AM
0 responses
47 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, 09-23-2026, 11:05 AM
0 responses
38 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, 09-18-2026, 11:37 AM
1 response
51 views
0 reactions
Last Post pekgio
by pekgio
 
Working...