Wednesday 9 November 2011

De Novo Assembly of Illumina reads with Velvet (1.0.17) and read alignment with Bowtie (0.12.7) | molecularevolution.org

I chanced upon this nicely written tutorial and also the idea to use bowtie to estimate insert size distribution! Neat! Also includes a little bit of R too


Expected learning outcome

The objective of this activity is to help you understand how to run velvet in general, how to accurately estimate the insert size of a paired-end library through the use of Bowtie, the primary parameters of velvet, and the process involved in producing a de novo assembly from Illumina reads.


Type the following commands in R to calculate mean and standard deviation, and draw a histogram of the insert size distributions:

    sizes <- as.numeric(readLines("300bp_pe_def.sizes"))
    mean(sizes, na.rm=TRUE)
    median(sizes, na.rm=TRUE)
    sd(sizes, na.rm=TRUE)
    hist(sizes, nclass=50)

    sizes <- as.numeric(readLines("3kb_mp_def.sizes"))
    mean(sizes, na.rm=TRUE)

    median(sizes, na.rm=TRUE)

    sd(sizes, na.rm=TRUE)

    hist(sizes, nclass=50)

When you are satisfied, you can quit R by typing q(). It is interesting to see now that the median differs significantly from what was estimated in the laboratory originally.
http://molecularevolution.org/resources/activities/velvetbowtie_activity

1 comment:

  1. when I get to hist I get this error:

    > hist(sizes, nclass=50)
    Error in hist.default(sizes, nclass = 50) :
    hist.default: pretty() error, breaks=
    In addition: Warning messages:
    1: In min(x) : no non-missing arguments to min; returning Inf
    2: In max(x) : no non-missing arguments to max; returning -Inf

    ReplyDelete

Datanami, Woe be me