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
            Recent Advances in Sequencing Analysis Tools
            by seqadmin


            The sequencing world is rapidly changing due to declining costs, enhanced accuracies, and the advent of newer, cutting-edge instruments. Equally important to these developments are improvements in sequencing analysis, a process that converts vast amounts of raw data into a comprehensible and meaningful form. This complex task requires expertise and the right analysis tools. In this article, we highlight the progress and innovation in sequencing analysis by reviewing several of the...
            05-06-2024, 07:48 AM
          • 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

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, Today, 02:46 PM
          0 responses
          10 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 05-07-2024, 06:57 AM
          0 responses
          13 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 05-06-2024, 07:17 AM
          0 responses
          16 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 05-02-2024, 08:06 AM
          0 responses
          23 views
          0 likes
          Last Post seqadmin  
          Working...
          X