Package: pyScaf
Table of ContentspyScafScaffolding modesNGS-based scaffoldingScaffolding based on long readsReference-based scaffoldingUsageDependenciesParametersTest runProof of conceptpyScafpyScaf orders contigs from genome assemblies utilising several types of information:paired-end (PE) and/or mate-pair libraries ([NGS-based mode](#ngs-based-scaffolding))long reads ([NGS-based mode](#scaffolding-based-on-long-reads))synteny to the genome of some related species ([reference-based mode](#reference-based-scaffolding))Scaffolding modesNGS-based scaffoldingThis is under development… Stay tuned.Scaffolding based on long readsExperimental version available.Reference-based scaffoldingIn reference-based mode, pyScaf uses synteny to the genome of closely related species in order to order contigs and estimate distances between adjacent contigs.Contigs are aligned globally (end-to-end) onto reference chromosomes, ignoring:matches not satisfying cut-offs (–identityand–overlap)suboptimal matches (only best match of each query to reference is kept)and removing overlapping matches on reference.In preliminary tests, pyScaf performed superbly on simulated heterozygous genomes based onC. parapsilosis(13 Mb; CANPA) andA. thaliana(119 Mb; ARATH) chromosomes, reconstructing correctly all chromosomes always for CANPA and nearly always for ARATH (Figures in dropbox,CANPA table,ARATH table).
Runs took ~0.5 min for CANPA on4 CPUsand ~2 min for ARATH on16 CPUs.Important remarks:Reduce your assembly before (fasta2homozygous.py) as any redundancy will likely break the synteny.pyScaf works better with contigs than scaffolds, as scaffolds are often affected by mis-assemblies (node novo assembler/ scaffolder is perfect…), which breaks synteny.pyScaf works very well if divergence between reference genome and assembled contigs is below 20% at nucleotide level.pyScaf deals with large rearrangements ie. deletions, insertion, inversions, translocations.Note however, this is experimental implementation!Consider closing gaps after scaffolding.UsageDependenciesLAST v700+FastaIndexParametersGiven reference genome, the program generates pairwise genome alignment (dotplots) by default.Genral options:-h,--helpshow this help message and exit-fFASTA,--fastaFASTAassembly FASTA file-oOUTPUT,--outputOUTPUToutput stream [scaffolds.fa]-tTHREADS,--threadsTHREADSmax no. of threads to run [4]--logLOGoutput log to [stderr]--dotplotgenerate dotplot as [png]--versionshow program’s version number and exitReference-based scaffolding options:-rREF,--refREF,--referenceREFreference FastA file--identityIDENTITYmin. identity [0.33]--overlapOVERLAPmin. overlap  [0.66]-gMAXGAP,--maxgapMAXGAPmax. distance between adjacent contigs [0.01 * assembly_size]--norearrangementshigh identity mode (rearrangements not allowed)Long read-based scaffolding options (EXPERIMENTAL!):-nLONGREADS,--longreadsLONGREADSFastQ/FastA file(s) with PacBio/ONT readsNGS-based scaffolding options (!NOT IMPLEMENTED!):-iFASTQ,--fastqFASTQFASTQ PE/MP files-jJOINS,--joinsJOINSmin pairs to join contigs [5]-aLINKRATIO,--linkratioLINKRATIOmax link ratio between two best contig pairs [0.7]-lLOAD,--loadLOADalign subset of reads [0.2]-qMAPQ,--mapqMAPQmin mapping quality [10]Test runTo perform reference-based assembly, provide assembled contigs and reference genome in FastA format.
Dotplots of below runs can be found in [docs](/docs).
If you wish to skip dotplot generation (ie. no X11 on your system), provide–dotplot ‘’parameter.# scaffold homogenised assembly (reduced contigs)./pyScaf.py-ftest/contigs.reduced.fa-rtest/ref.fa-otest/contigs.reduced.ref.fa# scaffold reduced contigs using global mode (no norearrangements allowed)./pyScaf.py-ftest/contigs.reduced.fa-rtest/ref.fa-otest/contigs.reduced.ref.global.fa--norearrangements# scaffold heterozygous assembly (de novo assembled contigs)./pyScaf.py-ftest/contigs.fa-rtest/ref.fa-otest/contigs.ref.fa# scaffold reduced contigs using long reads
## pacbio./pyScaf.py-ftest/contigs.reduced.fa-ntest/pacbio.fq.gz-otest/contigs.reduced.pacbio.fa## nanopore./pyScaf.py-ftest/contigs.reduced.fa-ntest/nanopore.fa.gz-otest/contigs.reduced.nanopore.fa# generate dotplotlastdbtest/ref.falastal-fTABtest/ref.fatest/contigs.reduced.pacbio.fa|last-dotplot-test/contigs.reduced.pacbio.fa.ref.pnglastal-fTABtest/ref.fatest/contigs.reduced.nanopore.fa|last-dotplot-test/contigs.reduced.nanopore.fa.ref.png# clean-up
#rm test/contigs.{,reduced.}fa.* test/ref.fa.* test/*.{nanopore,pacbio,ref}* test/*.logProof of conceptpyScaf is under heavy development right now.
Nevertheless, the reference-based mode is functional and produces meaningful assemblies. Moverover, it has been implemented inRedundans.For more info, have a look inworkbook.