An assembly of reads, contigs and scaffolds

A blog on all things newbler and beyond

Archive for the ‘scripts’ Category

A script for converting the 454NewblerMetrics.txt file to a tab-separated file

Posted by lexnederbragt on May 9, 2011

(source: Wikimedia commons)

One of you asked in the comments: “Is there an existing way of converting the 454NewblerMetrics.txt file to a tab-delimited file?”

I have in fact written a script for that. We use it all the time in our group for newbler assemblies, and I am hereby sharing it with you. The perl script, called newblermetrics.pl, needs to be given a 454NewblerMetrics.txt file from a newbler assembly. It works both on shotgun assemblies, with or without paired end data, and on cDNA assemblies (for which it includes the isogroups and isotigs metrics in the output). It will not work on mapping projects (gsMapper/runmapping commands).

The script produces an output like this:

Input
Number of reads    975240
Number of bases    275262092
Number of reads trimmed    1195883    122.6%
Number of bases trimmed    256085747    93.0%

Consensus results
Number of reads assembled    1065078    89.1%
Number partial    14365    1.2%
Number singleton    105760    8.8%
Number repeat    7248    0.6%
Number outlier    3432    0.3%
Number too short    0    0.0%

Scaffold Metrics
Number of scaffolds    12
Number of bases    5799904
Average scaffold size    483325
N50 scaffold size    5479633
Largest scaffold size    5479633

Large Contig Metrics
Number of contigs    479
Number of bases    5694980
Average contig size    11889
N50 contig size    44505
Largest contig size    160534
Q40 plus bases    5686792    99.86%

All Contig Metrics
Number of contigs    1748
Number of bases    6114087
Average contig size    3498

Library    Pair distance average (bp)
lib_3kb.sff    2542.8
lib_8kb.sff    7601.6

The script is available for download here: http://sourceforge.net/projects/newblertools/files/newblermetrics. I’d appreciate any feedback!

UPDATE Dag Ahren and Björn Canbäck made a web version of the script, accessible here: http://mbio-serv2.mbioekol.lu.se/apps/newblerMetrics.html

Advertisements

Posted in Newbler output, scripts | Tagged: , | 11 Comments »