forked from marbl/canu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Script for generating consensus from bogart ctgStore output.
- Loading branch information
1 parent
b0b806f
commit d008e10
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/sh | ||
|
||
# Runs consensus, in parallel, on a ctgStore from bogart. | ||
# | ||
# Magic values for partitioning: | ||
# partitionSize - make partitions this big, relative to the biggest contig | ||
# 0.10 - each big contig gets its own partition | ||
# partitionScaling - expect contigs to expand by this much due to homopoly compression | ||
# 1.50 - 50% expansion of contig length, affects memory estimate | ||
# partitionTigs - put this many reads (as fraction of total) in a partition | ||
# 0.01 - puts small contigs into many partitions | ||
|
||
asmpre=asm | ||
cnspre=asm | ||
errorRate=0.01 | ||
|
||
if [ ! -e ./${cnspre}.ctgStore/partitioning ] ; then | ||
echo Partitioning reads. | ||
|
||
utgcns -V \ | ||
-S ../../${asmpre}.seqStore \ | ||
-T ./${cnspre}.ctgStore 1 \ | ||
-partition 0.10 1.50 0.01 \ | ||
> ./${cnspre}.ctgStore/partitioning.log 2>&1 | ||
fi | ||
|
||
parts=`cd ./${cnspre}.ctgStore ; ls partition.???? | sed s/partition.//` | ||
|
||
for pp in $parts ; do | ||
if [ ! -e "./${cnspre}.${pp}.cns" ] ; then | ||
echo \ | ||
utgcns \ | ||
-R ./${cnspre}.ctgStore/partition.${pp} \ | ||
-T ./${cnspre}.ctgStore 1 \ | ||
-P ${pp} \ | ||
-A ./${cnspre}.${pp}.cns.fasta \ | ||
-O ./${cnspre}.${pp}.cns \ | ||
-maxcoverage 50 \ | ||
-e ${errorRate} \ | ||
-threads 8 \& | ||
fi | ||
done | ||
|
||
exit 0 |