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
              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...
              Today, 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, 07:17 AM
            0 responses
            11 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 05-02-2024, 08:06 AM
            0 responses
            19 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 04-30-2024, 12:17 PM
            0 responses
            20 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 04-29-2024, 10:49 AM
            0 responses
            28 views
            0 likes
            Last Post seqadmin  
            Working...
            X