Is there something like amos Hawkeye for any assembly fasta file??
Unconfigured Ad
Collapse
X
-
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
-
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:
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.Code:perl count_fasta.pl -i 20 infile.fasta
Best,
Simon
Edit:
No support for differential coloring within the script, of course.
Comment
Latest Articles
Collapse
-
by SEQadmin2
The immune system’s power comes from its genetic diversity, allowing myriad threats to be neutralized through first recognizing foreign antigens. That diversity is also what makes the immune system so difficult to study. Recent advances in sequencing technology and computational biology, however, are giving researchers new tools to understand immune responses and immune-related diseases in greater detail.
This convergence of genetics, immunology, and computation...-
Channel: Articles
09-01-2026, 05:41 AM -
ad_right_rmr
Collapse
News
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by SEQadmin2, 09-09-2026, 12:14 PM
|
0 responses
23 views
0 reactions
|
Last Post
by SEQadmin2
09-09-2026, 12:14 PM
|
||
|
Started by SEQadmin2, 09-09-2026, 11:33 AM
|
0 responses
19 views
0 reactions
|
Last Post
by SEQadmin2
09-09-2026, 11:33 AM
|
||
|
Started by SEQadmin2, 09-03-2026, 10:22 AM
|
0 responses
30 views
0 reactions
|
Last Post
by SEQadmin2
09-03-2026, 10:22 AM
|
||
|
Started by SEQadmin2, 09-02-2026, 12:32 PM
|
0 responses
45 views
0 reactions
|
Last Post
by SEQadmin2
09-02-2026, 12:32 PM
|
Comment