Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • kopardev
    Member
    • Oct 2011
    • 19

    Contig size distribution vizualizer

    Is there something like amos Hawkeye for any assembly fasta file??
  • kopardev
    Member
    • Oct 2011
    • 19

    #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

    • sphil
      Senior Member
      • Apr 2010
      • 192

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

      Comment

      • kopardev
        Member
        • Oct 2011
        • 19

        #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

        • sphil
          Senior Member
          • Apr 2010
          • 192

          #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

          • sisch
            Member
            • Jun 2011
            • 29

            #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

            • SEQadmin2
              Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
              by SEQadmin2



              Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
              ...
              07-09-2026, 11:10 AM
            • SEQadmin2
              Cancer Drug Resistance: The Lingering Barrier to Rising Survival
              by SEQadmin2



              Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

              There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
              07-08-2026, 05:17 AM
            • GATTACAT
              Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
              by GATTACAT
              Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
              07-01-2026, 11:43 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, 07-13-2026, 10:26 AM
            0 responses
            20 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-09-2026, 10:04 AM
            0 responses
            30 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-08-2026, 10:08 AM
            0 responses
            18 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-07-2026, 11:05 AM
            0 responses
            34 views
            0 reactions
            Last Post SEQadmin2  
            Working...