Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Visualizing Alignments to a gene

    I will apologize in advance if this is a really obvious question. I am analyzing some RNA seq data using TopHat/Bowtie for alignment and Cufflinks for expression analysis. I want to pull out the consensus sequence for all the reads that align to a particular gene. I know that I can use SAMtools to pull out all the raw reads that align to a region, but that is still thousands of individual reads to deal with.

    Is there a function that I am missing in the software packages I currently use? Or is there some alternative piece of software that I should be using?

    Thanks in advance!

  • #2
    Galaxy has a nice pileup-to-interval function that takes as input the mpileup output of samtools, and generates a consensus sequence for regions above a certain coverage. Tablet is nice for visualising mapping and the consensus sequence and exon boundaries:

    Comment


    • #3
      If you just want to view chunks of RNA seq bams, try this script, it creates a wig (wiggle) file which you can upload to UCSC browser as a custom track. In this case, it is called "bam2wig"

      #example usage: ./bam2wig example.bam chr5:10333595-15399999 fileName.wig
      #this uses SAMT variable, you must edit export line (bash specific ) to point to your samtools executable

      export SAMT=samtools-0.1.18/samtools
      echo "track type=wiggle_0 name=fileName.wig description=examplecustomwig" > $3
      $SAMT depth -r $2 $1 | awk '{if ($1!=p) {print "variableStep chrom="$1;} print $2" "$3;p=$1;}' >> $3

      Comment


      • #4
        Thanks

        Dear Richard,
        Great script. Thanks for sharing!

        For others who use it, don't forget to index your bam file first
        samtools index <yourfile>.bam

        -Danielle

        Comment


        • #5
          If you want to stick with samtools, you can use bcftools and vcfutils.pl vcf2fq (which come with your samtools installation) to get a consensus. This can all be done in one command line, like:

          samtools view -u aln.bam chromsome_name:X1-X2 | samtools mpileup -uf ref.fa - | bcftools view -cg - | vcfutils.pl vcf2fq > cns.fq

          Where aln.bam is your alignment, chromosome_name is the identifier in your original ref.fa, and X1 and X2 are the coordinates of interest.

          See documentation here:

          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, 04-11-2024, 12:08 PM
          0 responses
          59 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 10:19 PM
          0 responses
          57 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 09:21 AM
          0 responses
          51 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-04-2024, 09:00 AM
          0 responses
          55 views
          0 likes
          Last Post seqadmin  
          Working...
          X