Repository navigation
v0.9.1
Pre-release: functional but not yet fully tested.
Added
- Paralog check (
--query_paralog). A FASTA of known paralogs, named after their query plus_paralog1,_paralog2, … (checked at startup, including the sequence type). The paralogs are BLASTed against every assembly, and13_summary_data/{query_id}_paralog_check.tsvreports per sample whether the hit reported for the query is closest to the query or to one of the paralogs (call:query,paralog,ambiguous,no_hit), with bit score, identity and coverage of every reference at the hit locus and the paralogs' own best loci.--paralog_ambiguous_ratio(default 0.95) sets when a call is ambiguous. - Alignment filter for the per-query trees (
--min_align_prop, default 0.8). Sequences covering less than this proportion of the core alignment are left out of the BLAST, CDS, protein and isoform trees. The core is the columns of the query reference, or, without it, the columns where at least half of the sequences have a residue, so that a single long outlier cannot exclude all other sequences. The query reference is always kept.9_phylogenies/.../*_phylogeny.alignment_filter.tsvlists the decision for every sequence;*_phylogeny.filtered_alignment.fastais the tree input. - Contig edges and ORF ends in the CDS integrity tables. A gene model that is incomplete only because it runs off the contig (or reaches an assembly gap) now has status
partialinstead oftruncated, withtruncation_causecontig_edge/assembly_gapinstead ofnucleotide_deletion. New columns:contig_edge(which end runs off the contig),orf_end(expected_stop,premature_stop= ORF cut short,late_stop,contig_end),contig_flank_5prime_nt/contig_flank_3prime_nt(contig sequence beyond the coding part). Partial isoforms are excluded from the intact-only table and drawn grey in the isoform trees. sample_names.tsvin the output folder maps every input to its--SRR_sample_mapname and final sample name.- Truncated isoforms. Every Exonerate CDS is classified as full-length, truncated or stop-lost (
extended), separating nucleotide-level deletions (query segment absent, contig end, assembly gap) from ORF mutations (frameshift, premature stop, lost start/stop codon, non-canonical splice site). New outputs in13_summary_data/:{query_id}_isoforms_incl_truncated.tsv(all sequences with isoform IDs, status and mutations; samples without a hit listed asno_hit) and{query_id}_isoform_mutations.tsv(one row per mutation with query position, contig coordinates and codon change).{query_id}_isoforms.tsvnow holds intact isoforms only. - Isoform sequences.
13_summary_data/{query_id}_cds_isoforms.fastaand{query_id}_protein_isoforms.fastahold one sequence per unique isoform, with the number of samples and their status in the header. The isoform tables also havecds_sequenceandprotein_sequencecolumns. - Isoform trees. IQ-TREE trees with one tip per CDS and per protein isoform (
9_phylogenies/exonerate/{query_id}/{query_id}_{cds,protein}_isoform_phylogeny.*), built from13_summary_data/{query_id}_{cds,protein}_isoforms_aligned.fasta. Each tree is also drawn as a midpoint-rooted PDF, with tips labelled by isoform number and sample count, truncated isoforms coloured, the reference marked and bootstrap support shown. Requires at least 3 isoforms. Uses thebioconductor-ggtreecontainer (R/ape). - TEs near the hit. With
--repeat_libraryand--blast_query,13_summary_data/{query_id}_scaffold_TEs.tsvlists every TE on the scaffold carrying each sample's hit (Exonerate gene model, or best BLAST hit), with class/family, strand relative to the hit, and edge-to-edge distance in the hit's 5'→3' orientation (negative = upstream, positive = downstream, 0 = overlap).{query_id}_scaffold_TEs_summary.tsvgives one row per hit with the overlapping and nearest upstream/downstream TEs. RepeatMasker.outtables are now kept in12_repeatmasker/. - Sample name collision check. The run stops before assembly when two inputs (reads, SRA runs, scaffolds) end up with the same sample name, including after
--SRR_sample_maprenaming or after characters outside[A-Za-z0-9._-]are replaced by_. The error lists the clashing inputs. Before, their outputs overwrote each other and IQ-TREE failed on duplicated names. --exonerate_refine(regiondefault,full,none) sets how Exonerate refines its alignment (see Fixed).
Changed
- SLURM submission throughput. Nextflow now submits up to 240 jobs per minute (was 60) and keeps up to 500 in the queue (was 300).
- Sample names are made filesystem-safe at input. Characters outside
[A-Za-z0-9._-]are replaced by_in sample names for all steps and outputs (Iran_2024_Kch(2)12-1g→Iran_2024_Kch_2_12-1g); tree tips already showed these names. See Fixed. - README restructured. One table of pipeline steps; options grouped by purpose in tables with their defaults and requirements; outputs listed per folder; one methods section instead of descriptions repeated under options and outputs. Corrected: profile CPUs and the default profile, the genome-wide depth statistic of
--locus_coverage, BUSCO protein (not nucleotide) sequences for the species tree, the BUSCO download location, and outputs that were missing (fastp JSON reports, run statistics, query sequences, BWA summary text). - Isoforms are numbered by frequency. Before, the query reference was isoform 1, and the others were numbered in alphabetical order of the samples. Now intact isoforms come first, ordered by the number of sample sequences carrying them, so the most frequent is isoform 1. They are followed by the query reference if no intact sample shares it, then by isoforms found only in truncated or stop-lost sequences, again by frequency. The intact-only table numbers consecutively. Numbering is shared by all isoform files.
- Sequence names are sample IDs throughout. Protein headers no longer carry a
_protsuffix (they match the CDS:sample_id, orsample_id_Nfor several gene models; the translated nucleotide query is named by the first word of its header). In the combined BLAST hit FASTA, each hit is named by its sample ID with its location as description (>sample_id scaffold:start-end). MAFFT's_R_reverse-complement prefix is removed from all alignments and listed in the MAFFT log. Alignments and trees therefore show sample names. - Documentation of the per-query trees. The README said the Exonerate CDS/protein trees require
--phylo_tree. They are in fact always built with--search_tool exonerate, and--phylo_treerequires--busco_lineage, so the documented example failed. The README now describes the actual behaviour, and gives the RAxML-NG BUSCO model consistently as LG+G.
Fixed
- Samples with special characters in their name lost their hits. Nextflow backslash-escapes staged file names, so a quoted path such as
"Iran_2024_Kch\(2\)12-1g_blast_results.tsv"was not found: hit extraction silently wrote an empty FASTA, and the CDS integrity step failed. Sample names are now safe at input (see Changed), and staged paths in hit extraction and CDS integrity are no longer quoted, which also covers assembly files with such characters. - Contig ends reported as lost start or stop codons. When the contig ended right at a short unaligned terminus or before the stop codon, the model was reported as
start_lost/stop_lost(an ORF mutation, statusextendedfor the stop). These are now contig edges (statuspartial). A reading frame that runs into the contig end without a stop codon reports its protein length as a minimum (>=N). - TEs near the hit missing on large datasets. The step loaded the RepeatMasker tables of all samples completely and ran out of memory (its 2 GB limit did not grow on retry), so the
*_scaffold_TEs*.tsvtables were silently not written. It now keeps only the TEs on the hit scaffolds, and its memory grows on retry. --NCBI_API_keyhad no effect. The key was printed but never passed to the SRA lookup. It is now given toentrez-direct(NCBI_API_KEY), and the startup summary shows only whether a key is set instead of the key itself.- BLAST hit tree failed or was unreadable. BLAST hits were named only by scaffold location, so tree tips did not show the sample, and IQ-TREE failed when two samples shared a scaffold name and location.
- Exonerate with nucleotide CDS queries returned no hits. Nucleotide queries now use the
coding2genomemodel instead ofest2genome.est2genomereported the aligned region as UTR/exon and emitted no CDS features, so nothing was extracted even when the exon structure was found. Separate alignments on the same target are no longer merged into one gene model, and only the best-scoring model is kept where alignments overlap. - Exonerate dropped exons of divergent alleles. Exonerate now refines its heuristic alignment (
--refine region). Before, intact but divergent alleles often came out as single-exon fragments and looked truncated. - Antisense CDS models. For nucleotide queries,
coding2genomealignments of the reverse-complemented query are no longer extracted. At divergent loci they could outscore the sense model and replace it. - Nucleotide BLAST missed divergent or short-exon hits.
blastnnow runs with-task blastninstead of the megablast default.