Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • slice Bam

    I have a bam file and i wish to exclude all the reads that are part of known genes. i got the exon list + Coordinates from ucsc as a .gtf file, but i'm not sure what's next... should I use samtools? if so, what options?

    Thank you very much in advance,
    Lilach

  • #2
    You might use htseq-count and use its option to write to SAM format. It then adds a flag indicating if there was a gene assignment or not. You can then simply use grep to extract the "no_feature" (or whatever that's called) reads. There are faster ways, but this is likely the simplest.

    Comment


    • #3
      Originally posted by LilachNoy View Post
      I have a bam file and i wish to exclude all the reads that are part of known genes. i got the exon list + Coordinates from ucsc as a .gtf file, but i'm not sure what's next... should I use samtools? if so, what options?

      Thank you very much in advance,
      Lilach
      This might be a solution (not tested) using bedtools and samtools.

      First, create a bed file of intergenic regions, then use samtools to extract reads in the bed intervals.

      Code:
      bedtools complement -i genes.gtf -g genome.txt > intergenic_regions.bed
      samtools view aln.bam -L intergenic_regions.bed > intergenic_reads.sam
      genome.txt is a tab-separated file of chromosome sizes which you can get from UCSC. See help in bedtools complement.

      Hope this helps
      Dario

      Comment

      Latest Articles

      Collapse

      • seqadmin
        Essential Discoveries and Tools in Epitranscriptomics
        by seqadmin




        The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
        04-22-2024, 07:01 AM
      • seqadmin
        Current Approaches to Protein Sequencing
        by seqadmin


        Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
        04-04-2024, 04:25 PM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, Yesterday, 08:47 AM
      0 responses
      16 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-11-2024, 12:08 PM
      0 responses
      60 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 10:19 PM
      0 responses
      60 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 09:21 AM
      0 responses
      54 views
      0 likes
      Last Post seqadmin  
      Working...
      X