Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Contig size distribution vizualizer

    Is there something like amos Hawkeye for any assembly fasta file??

  • #2
    I am looking to visualize an assembly. That is make a histogram of contig sizes and possibly color by number of N's. Is there a way to do this quickly??

    Comment


    • #3
      i do not know a program but that should be can done in R quite easily...

      Comment


      • #4
        Sphil.. do you have a R script for this lying around that you can post here.

        I got this after hours of google-ing:


        library(lattice)
        data<-read.table("contigs.bases.sizes")
        y=t(data[2])
        myhist <- function(x, ..., breaks="Sturges",
        main = paste("Histogram of", xname),
        xlab = xname,
        ylab = "Frequency") {
        xname = paste(deparse(substitute(x), 500), collapse="\n")
        h = hist(x, breaks=breaks, plot=FALSE)
        plot(h$breaks, c(NA,h$counts), type='S', main=main,
        xlab=xlab, ylab=ylab, axes=FALSE, ...)
        axis(1)
        axis(2)
        lines(h$breaks, c(h$counts,NA), type='s')
        lines(h$breaks, c(NA,h$counts), type='h')
        lines(h$breaks, c(h$counts,NA), type='h')
        lines(h$breaks, rep(0,length(h$breaks)), type='S')
        invisible(h)
        }
        myhist(y,log="y",breaks=100,xlab="contig length(bp)")
        q()


        But this does not give any control over size of the histogram bin or any way to color bins by number of N's in them. I am not a R expert, can someone help me out?
        Thanks!

        Comment


        • #5
          Hey,

          unfortunately i do no have one. Maybe one of my collegues. I am out of office right now. I will contact you if so...


          best,


          Phil

          Comment


          • #6
            Hey,

            I still often do this the old-school way, using the count_fasta.pl perl-script of Joseph Fass. http://wiki.bioinformatics.ucdavis.e...Count_fasta.pl

            Usage for bin-width of 20:
            Code:
            perl count_fasta.pl -i 20 infile.fasta
            This gives you a histogram table you can use to visualize in your preferred spreadsheet software. Furthermore it provides information about N50 and GC content, which is useful for judging the assembly quality.

            Best,
            Simon

            Edit:
            No support for differential coloring within the script, of course.

            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...
              Yesterday, 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
            57 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 04-10-2024, 10:19 PM
            0 responses
            53 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 04-10-2024, 09:21 AM
            0 responses
            45 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