Header Leaderboard Ad

Collapse

Extracting certain genes from a SAM/BAM file.

Collapse

Announcement

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

  • Extracting certain genes from a SAM/BAM file.

    Hello,

    So I am working on an experement in which I have narrowed down the data of interest to a pretty small number of genes, about 200. I want to use many of the tools out there for analysis, like picard for instance, but SAM/BAM files are often required. So since I need to compare the data output from picard with other data on these genes specifically, I want to make a pseudo-SAM file that is just the concatenated information from the SAM file for the right locations. So lets say that I want to look at data from a gene that starts at position 100 and goes to position 1000, then the next gene I am interested in is from position 5000-5500. Is there a relatively simple way to grab 100-1000, 5000-5500, etc and make a SAM/BAM file from only those regions of interest so I can use that (in conjunction with a respective pseudo-reference genome) to do my analysis? Thanks very much for any advice!

  • #2
    Just make a BED file of the regions and:
    Code:
    samtools view -b -L regions.bed alignments.bam > subset.bam

    Comment

    Latest Articles

    Collapse

    • seqadmin
      How RNA-Seq is Transforming Cancer Studies
      by seqadmin



      Cancer research has been transformed through numerous molecular techniques, with RNA sequencing (RNA-seq) playing a crucial role in understanding the complexity of the disease. Maša Ivin, Ph.D., Scientific Writer at Lexogen, and Yvonne Goepel Ph.D., Product Manager at Lexogen, remarked that “The high-throughput nature of RNA-seq allows for rapid profiling and deep exploration of the transcriptome.” They emphasized its indispensable role in cancer research, aiding in biomarker...
      09-07-2023, 11:15 PM
    • seqadmin
      Methods for Investigating the Transcriptome
      by seqadmin




      Ribonucleic acid (RNA) represents a range of diverse molecules that play a crucial role in many cellular processes. From serving as a protein template to regulating genes, the complex processes involving RNA make it a focal point of study for many scientists. This article will spotlight various methods scientists have developed to investigate different RNA subtypes and the broader transcriptome.

      Whole Transcriptome RNA-seq
      Whole transcriptome sequencing...
      08-31-2023, 11:07 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by seqadmin, Yesterday, 07:42 AM
    0 responses
    10 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 09-22-2023, 09:05 AM
    0 responses
    23 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 09-21-2023, 06:18 AM
    0 responses
    16 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 09-20-2023, 09:17 AM
    0 responses
    16 views
    0 likes
    Last Post seqadmin  
    Working...
    X