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
              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
            • seqadmin
              Strategies for Sequencing Challenging Samples
              by seqadmin


              Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
              03-22-2024, 06:39 AM

            ad_right_rmr

            Collapse

            News

            Collapse

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