Output
After you have succesfully ran NextPyper, you will get an output directory (hereafter outdir/) for your run. In this page you will find the neccesary information to interpret its contents.
Output structure
NextPyper outdir/ directory follows the following structure:
📁 outdir/
-
📄 config.yaml # Final config with the parameters used to run the workflow.
-
📄 execution.log # Snakemake execution log of the workflow jobs.
-
📁 logs/ # Logs generated by the workflow jobs.
-
📄 nextpyper.log # Summary of parameters and snakemake invocation.
-
📁 outputs/ # Final outputs of the workflow.
-
📁 alignments/ # Loci Multiple Sequence Alignments (MSAs).
-
📁 seqs_per_locus/ # Homologous sequences per locus.
-
📁 seqs_per_sample/ # Homologous sequences per sample.
-
-
📁 workflow/ # Working folder for all the jobs and stages of the pipeline. It contains intermediate and final files.
The main outputs can be found in outdir/outputs in different versions (see below).
If you are interested in the intermediate steps of the workflow, you can learn more about the workflow/ and logs/ directories in Intermediates directories.
Sequence versions
The main output of NextPyper are the samples’ homologous sequences for each targeted locus. We generate 3 versions of these sequences, depending on the final postprocessing:
- Exons: includes only the exonic part of the sequence.
- Genetigs: includes exons and introns.
- Supercontigs: The full sequence, including exons, introns and flanking regions.
The exons are the shorter and more conserved version of the output sequences, while the supercontigs are longer and include all discovered variation (which can be a bit noisy). Genetigs usually provide a good balance, containing more signal than the exons without it being overwhelming. You may want to explore which type of sequence suits better your purposes.
Output files
For both outputs/seqs_per_locus/ and outputs/alignments/ folders, you will find the sequences organized per locus, in separate folders, following the naming convention: <LocusID>_<frag_start>_<frag_end>_<seq_version>.fasta, where:
- LocusID: identifier for the Locus.
- frag_start: Start position of the sequence (relative to the probe).
- frag_start: End position of the sequence (relative to the probe).
- seq_version: Either exons, genetigs, or supercontigs version of the sequences.
For instance, a part of such directory can look like this:
📁 outdir/outputs/seqs_per_locus/
-
📁 4793/
- 📄 4793_18_540_exons.fasta
- 📄 4793_18_540_genetigs.fasta
- 📄 4793_18_540_supercontigs.fasta
-
📁 4796/
- 📄 4796_0_158_exons.fasta
- 📄 4796_0_158_genetigs.fasta
- 📄 4796_0_158_supercontigs.fasta
- 📄 4796_179_237_exons.fasta
- 📄 4796_179_237_genetigs.fasta
- 📄 4796_179_237_supercontigs.fasta
Here, we have 2 loci (LocusID=4793, and LocusID=4796), where the first one recovered a single long fragment, whereas the second one was recovered in two shorter fragments.
Sequence header metadata
NextPyper final sequence headers contain plenty metadata about the sequence. In the fasta format, we can divide the header into Sequence name and Sequence description, which are separated by a space ><seq_name> <seq_description>. For instance:
>H1_F8|H1_B11-probe_10211_EDGE_145_length_674_cov_14.4421:1:8:8:9734 [query=probe_10211] [cover=0.38] [ident=0.9408] [score=741] [tribble=negative] [length=674]
TGGTATTGGACTTGGGATACCTGGTCTGGCATGTGTTCTCCTAATAGGATTCTGTGTGTT
TGCAAGGTACAAGTCCAATGGTATTACAAATAACCTTAGACATATTGAAGCATCTTCAAC
TGTATTACCCCAGCCACACCTTTTTGTAGTGGGACTTGATGAATCCGTAATACAATCTTASequence name
The sequence name is comprised of the following fields:
<sample_name>|<sample_seed>-<probe>_EDGE_<seed_id>_length_<len>_cov_<cov>:<comp>:<node1>:<node2>:<kmers>'
- sample_name: Name of the sample this sequence belongs to.
- sample_seed: Name of the sample whose seed was used to retrieve this sequence.
- probe: name of the probe/locus this sequence belongs to. It does not have to match the probe sequenceID.
- seed_id: ID assigned to the seed used to retrieve this sequence. For traceability purposes.
- len: Length of the sequence after SAUTE assembly. It will match the supercontig length, but not the exons nor genetig length.
- cov: Kmer coverage computed from SAUTE’s reported kmers and the sequence’s len.
- From the SAUTEs assembly:
- comp: Component ID. In combination with sample_seed, probe, and seed_id it allows to trace the sequence to its component of origin in the SAUTE’s assembly graph.
- node1: ID of the first parsing node in the component the sequence was taken from.
- node2: ID of the second parsing node in the component the sequence was taken from.
- kmers: Number of Kmers covering the sequence
Attributes node1 and node2 are only meaningful in the context of parsing SAUTE’s graph assembly, and can be safely ignored otherwise.
SAUTE's parsing explanation
SAUTE main output is the assembly graph, which is then parsed to generate the output sequences that NextPyper uses downstream.
For each component in the graph, SAUTE iterates all the graph elements (nodes and edges) and computes which path that traverses the current element has the highest score (kmer count). If it is not already present, the found path is added to the set of sequences to be generated for that component.
The identity of the graph element linked to the parsed sequence is recorded in the node1 and node2 attributes. If node1 == node2 the graph element was a node with the reported nodeID, whereas if node1 != node2 the graph element was the edge that conected the reported nodes.
Sequence description
Inspired by Captus, several attributes are added in the sequence description in brackets ([]). Those attributes are the following:
- query: sequenceID of the probe that match this sequence.
- cover: How much the sequence covers the probe (% of bases).
- ident: identity relative to the probe.
- score: miniprot match score of the sequence to the probe.
- tribble: Whether the sequence stems from a tribble. It can be
positiveornegative. - length: Actual length of the sequence. Different from the <len> reported in the sequence name.