anvi-merge-trnaseq

This program processes one or more anvi'o tRNA-seq databases produced by anvi-trnaseq and outputs anvi'o contigs and merged profile databases accessible to other tools in the anvi'o ecosystem. Final tRNA "seed sequences" are determined from a set of samples. Each sample yields a set of tRNA predictions stored in a tRNA-seq database, and these tRNAs may be shared among the samples. tRNA may be 3' fragments and thereby subsequences of longer tRNAs from other samples which would become seeds. The profile database produced by this program records the coverages of seeds in each sample. This program finalizes predicted nucleotide modification sites using tunable substitution rate parameters.

🔙 To the main page of anvi’o programs and artifacts.

Authors

Requires

trnaseq-db

Provides

trnaseq-contigs-db trnaseq-profile-db

Usage

This program finds tRNA seed sequences from a set of tRNA-seq samples.

This program follows anvi-trnaseq in the trnaseq-workflow. anvi-trnaseq is run on each tRNA-seq sample, producing sample trnaseq-dbs. A tRNA-seq database contains predictions of tRNA sequences, structures, and modification sites in the sample. anvi-merge-trnaseq takes as input the tRNA-seq databases from a set of samples. It compares tRNAs predicted from the samples, finding those in common and calculating their sample coverages. The final tRNA sequences predicted from all samples are called tRNA seeds and function like contigs in metagenomic experiments. Seeds are stored in a trnaseq-contigs-db and sample coverages are stored in a trnaseq-profile-db. These databases are variants of normal contigs-dbs and profile-dbs, performing similar functions in the anvi’o ecosystem but containing somewhat different information.

Most of the heavy computational work in the trnaseq-workflow is performed by anvi-trnaseq. anvi-merge-trnaseq is meant run relatively quickly, allowing its parameters to be tuned to fit the dataset.

The anvi-merge-trnaseq --help menu provides detailed explanations of the parameters controlling the multifacted analyses performed by the program.

Key parameters

Number of reported seeds

One key parameter is the number of reported tRNA seed sequences (--max-reported-trna-seeds). The default value of 10,000 seeds is more appropriate for a complex microbial community than a pure culture of a bacterial isolate, which should yield a number of tRNA seeds equal to the number of expressed tRNAs, say ~30. Sequence artifacts may be reported in addition to the 30 actual tRNAs with a higher value like 10,000. Artifacts are relatively common despite intensive screening by anvi-trnaseq and anvi-merge-trnaseq due to nontemplated nucleotides and modification-induced mutations introduced into tRNA-seq reads by reverse transcription. In practice, artifacts are easy to distinguish from true tRNA seeds by analyzing seed coverage in anvi-interactive and checking seed homology to reference databases, among other measures.

Modification filters

Other key parameters, --min-variation and --min-third-fourth-nt, determine the coverage cutoffs that distinguish predicted positions of modified nucleotides from single nucleotide variants. Compared to SNVs, modifications typically produce higher nucleotide variability to three or four different nucleotides. However, modification-induced mutations are often highly skewed to one other nucleotide rather than all three mutant nucleotides. Furthermore, the high coverage of seeds in many tRNA-seq libraries can uncover SNVs with a low-frequency third nucleotide rather than the expected two. Some SNVs that are wrongly called modifications can be easily spotted in anvi-interactive and the output of anvi-plot-trnaseq due to covariation at two positions in the seed as a result of base pairing. In other words, SNV frequencies are equivalent at the two base paired positions in every sample, where modification artifacts have no effect on nucleotide variability at another position across the molecule.

Examples

Merge two samples.

anvi-merge-trnaseq trnaseq_database_1 trnaseq_database_2 (…) \ -o OUTPUT_DIRECTORY \ -n PROJECT_NAME \

Merge two samples with and without demethylase treatment, giving priority to the demethylase split in calling the underlying nucleotide at modified positions.

anvi-merge-trnaseq untreated_trnaseq_database demethylase_trnaseq_database (…) \ -o OUTPUT_DIRECTORY \ -n PROJECT_NAME \ --preferred-treatment demethylase

Edit this file to update this information.

Command line interface

The following is the list of parameters and their descriptions in the latest version of anvi-merge-trnaseq.

The code that generates this web page ensures that this information is the latest available in 9-dev (eunice). Which means, in some cases the information in this section (generated automatically) might be more comprehensive or up-to-date compared to the descriptions above (written by humans).


Command line usage

anvi-merge-trnaseq [-h] [-o DIR_PATH] [-n PROJECT_NAME] [-T NUM_THREADS] [--max-reported-trna-seeds INT] [-W] [--description TEXT_FILE] [--feature-threshold {acceptor_stem,fiveprime_acceptor_stem_sequence,position_8,position_9,d_arm,d_stem,fiveprime_d_stem_sequence,d_loop,threeprime_d_stem_sequence,position_26,anticodon_arm,anticodon_stem,fiveprime_anticodon_stem_sequence,anticodon_loop}] [--preferred-treatment PREFERRED_TREATMENT] [--nonspecific-output NONSPECIFIC_OUTPUT] [--min-variation FLOAT] [--min-third-fourth-nt FLOAT] [--min-indel-fraction FLOAT] [--distance DISTANCE_METRIC] [--linkage LINKAGE_METHOD] TRNASEQ_DB(S) [TRNASEQ_DB(S) ...]

Parameters and their descriptions

MANDATORY
TRNASEQ_DB(S) required
Anvi'o tRNA-seq databases representing samples in an experiment
-o, --output-dir DIR_PATH
Directory path for output files
-n, --project-name PROJECT_NAME
Name of the project. Please choose a short but descriptive name (so anvi'o can use it whenever she needs to name an output file, or add a new table in a database, or name her first born).
EXTRAS
-T, --num-threads NUM_THREADS
Maximum number of threads to use for multithreading whenever possible. Very conservatively, the default is 1, unless the environmental variable `ANVIO_THREADS` sets another positive integer. If you use this parameter, it will override `ANVIO_THREADS`. It is a good idea to not exceed the number of CPUs / cores on your system. Plus, please be careful with this option if you are running your commands on a SGE -- if you are clusterizing your runs, and asking for multiple threads to use, you may deplete your resources very fast. Default: 1
--max-reported-trna-seeds INT
This parameter limits the number of tRNA seed sequences reported in the contigs database, as anvi-interactive can have trouble displaying large numbers of items. To remove the limit on reported seeds, specify a value of -1. Default: 10000
-W, --overwrite-output-destinations
Overwrite if the output files and/or directories exist.
--description TEXT_FILE
A plain text file that contains some description about the project. You can use Markdown syntax. The description text will be rendered and shown in all relevant interfaces, including the anvi'o interactive interface, or anvi'o summary outputs.
ADVANCED
--feature-threshold FEATURE_THRESHOLD
This option prevents formation of tRNA seed sequences from input sequences that did not reach the threshold feature in anvi-trnaseq profiling from the 3' end. The more stringent the threshold, the fewer spurious seeds are formed from rare chimeric and other inaccurate tRNA predictions. The most stringent threshold is "acceptor_stem", the most 5' feature, resulting in seeds formed only from tRNAs with a complete feature set (with the exception of the extra 5'-G in tRNA-His). Choices: acceptor_stem fiveprime_acceptor_stem_sequence position_8 position_9 d_arm d_stem fiveprime_d_stem_sequence d_loop threeprime_d_stem_sequence position_26 anticodon_arm anticodon_stem fiveprime_anticodon_stem_sequence anticodon_loop Default: anticodon_loop
--preferred-treatment PREFERRED_TREATMENT
tRNA-seq databases recorded as employing the preferred treatment are given preference in setting nucleotides at predicted modification positions in tRNA seed sequences. By default, equal preference is given to all of the input databases. The reason for this parameter is that paired untreated and enzymatically treated splits can assist in the identification of underlying modified nucleotides. For example, splits treated with a demethylase can be compared to untreated splits to probe which nucleotides are methylated.
--nonspecific-output NONSPECIFIC_OUTPUT
A significant fraction of tRNA-seq reads can be from tRNA fragments. These can be real biomolecules or artifactual 3' fragments produced as a result of incomplete reverse transcription of the tRNA template to cDNA. Rather than randomly assigning fragments to a single target, as in metagenomic read recruitment by Bowtie, anvi-trnaseq tracks all of the longer sequences containing each fragment. This results in two categories of coverage: 'specific' for reads that are only found in one seed and 'nonspecific' for reads found in multiple seeds. Specific coverages are always reported in a separate profile database. Nonspecific coverages can be reported in three types of database, as specified by this parameter. 'nonspecific_db' produces a profile database only containing nonspecific coverages. 'combined_db' produces a database containing separate specific and nonspecific layers. 'summed_db' produces a database containing summed specific and nonspecific coverages. To produce multiple types of databases, separate the database types with commas (no spaces). For example, all three databases are produced with the argument, 'nonspecific_db,combined_db,summed_db'. Default: nonspecific_db,combined_db
--min-variation FLOAT
When more than 2 nucleotides are found at a position in a tRNA, a modification-induced mutation (substitution) is considered rather than a single nucleotide variant. This parameter sets a key criterion for the prediction of a modification, the minimum fraction of specific coverage at a position with more than 2 nucleotides that must be contributed by nucleotides beside the most abundant nucleotide. For example, if A, C, and G are found at position 20 of a tRNA, and A is represented by 95 reads, C by 3 reads, and G by 1 read, then with a parameter value of 0.05, the site would be 1 C, G, or T short of meeting the threshold for prediction of a modification. Default: 0.01
--min-third-fourth-nt FLOAT
This parameter sets a key criterion for the prediction of a modification, the minimum fraction of specific coverage at a position with more than 2 nucleotides that must be contributed by nucleotides beside the 2 most abundant nucleotides. Unlike --min-variation, this criterion only needs to be met for 1 sample to permit modification of the position in all samples of the experiment. For example, consider an experiment with 2 samples and a parameter value of 0.01. In Sample 1, A, C, and G are found at position 20 of a tRNA, and A is represented by 95 reads, C by 4 reads, and G by 1 read. The default parameter value of 0.01 is exactly met at the position thanks to G. In Sample 2, A, C, G, and T are found at position 20 of the same tRNA seed, and A is represented by 1000 reads, C by 100 reads, G by 2 reads, and T by 2 reads. The third and fourth nucleotides don't meet the coverage threshold of 0.01, but this is irrelevant for calling the modification, since Sample 1 met the criterion. There is an important consideration due to the way this threshold is currently imposed. Potential modification sites that do not meet the threshold are not treated like single nucleotide variants in anvi-trnaseq: they do not cause the seed sequence to be split such that no seed contains a variant that was not deemed to be a modification. Rather, candidate modification positions that do not meet this threshold are retained in the seed BUT NOT REPORTED. Therefore, we recommend rerunning this command with a parameter value of 0 to inspect seeds for undisplayed variants (possible SNVs) with a low level of third and fourth nucleotides. Default: 0.002
--min-indel-fraction FLOAT
This parameter controls which indels are reported in the tRNA-seq profile database. Coverage of an indel in a sample must meet the minimum fraction of specific coverage. Indel coverages are calculated separately for specific, nonspecific, and summed coverages. Default: 0.001
--distance DISTANCE_METRIC
The distance metric for the hierarchical clustering. The default distance metric is 'euclidean'. You can find the full list of distance metrics either by making a mistake (such as entering a non-existent distance metric and making anvi'o upset), or by taking a look at the help menu of the hierarchy.distance.pdist function in the scipy.cluster module. Default: euclidean
--linkage LINKAGE_METHOD
The linkage method for the hierarchical clustering. The default linkage method is 'ward', because that is the best one. It really is. We talked to a lot of people and they were all like 'this is the best one available' and it is just all out there. Honestly it is so good that we will build a wall around it and make other linkage methods pay for it. But if you want to see a full list of available ones you can check the hierarchy.linkage function in the scipy.cluster module. Up to you really. But then you can't use ward anymore, and you would have to leave anvi'o right now. Default: ward

Additional Resources

Are you aware of resources that may help users better understand the utility of this program? Please feel free to edit this file on GitHub. If you are not sure how to do that, find the __resources__ tag in this file to see an example.