30 #ifndef TRIMAL_TRIMALARGUMENTPARSER_H 31 #define TRIMAL_TRIMALARGUMENTPARSER_H 34 #include "FormatHandling/FormatManager.h" 35 #include "Alignment/Alignment.h" 55 class similarityMatrix;
66 friend struct Catch::SectionInfo;
68 std::vector<std::string> *
vcfs =
nullptr;
319 template <uint T>
friend struct access_by;
327 #define trimAlManagerPrivateExposerCreator(TOKEN) template <> struct trimAlManager::access_by< TOKEN""_hash> 333 #define trimAlManagerPrivateExposerCaller(TOKEN) trimAlManager::access_by<TOKEN""_hash> float conservationThreshold
Similarity Threshold to use while trimming.
bool check_stats_incompatibilities()
Method to check statistics incompatibilities.
argumentReport html_out_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the html output file.
argumentReport split_by_stop_codon_argument(const int *argc, char *argv[], int *currentArg)
Method to parse split by stop codon argument.
argumentReport max_identity_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the max identity argument.
bool check_residue_and_sequence_overlap()
Method to check if both of them (residue overlap and sequence overlap) have been defined by the user ...
argumentReport select_cols_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the select columns argument.
bool terminalOnly
Flag to use the Terminal Only option.
bool selectSeqs
Flag to select sequences manually from the alignment.
bool check_and_prepare_coding_sequence()
Method to check and prepare the coding sequence.
float gapThreshold
Gap Threshold to use while trimming.
argumentReport ignore_filter_argument(const int *argc, char *argv[], int *currentArg)
char * compareset
Pointer to the argument that contains the compareset file.
bool check_arguments_incompatibilities()
Method to check argument incompatibilities. Take in mind that an incompatibility is between two argum...
bool check_file_aligned()
Method to check if an alignment needs to be aligned depending on the methods that have been asked to ...
argumentReport strict_plus_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the strictplus argument.
void postprocess_alignment()
int automatedMethodCount
Integer counter of the automatic methods. If the counter is bigger than 0, we are using an automati...
void verbosity_argument(const int *argc, char *argv[])
Method to parse the verbosity argument. This check is done before any other check. This is due to trimAl not performing any action if any help argument has been provided. .
argumentReport keep_seqs_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the keepSeqs argument.
float similarityThreshold
Similarity Threshold to use while trimming.
void delete_variables()
Method to delete all variables that need to be deallocated.
argumentReport out_format_arguments(const int *argc, char *argv[], int *currentArg)
Method to parse the output formats as -fasta -clustal or -formats [...].
void set_window_size()
Method to set correct window sizes depending on values for them given by the user.
argumentReport similarity_threshold_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the similarity threshold argument.
argumentReport window_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the Window argument.
bool processArguments(char *argv[])
Method to process the information obtained by trimAlManager::parseArguments It checks for argument in...
bool splitByStopCodon
Flag to use the SplitByCodonStop option.
bool check_inFile_incompatibilities()
Method to check the inFile argument incompatibilities.
bool strict
Flag to use the strict trimming method.
argumentReport automated1_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the automated1 argument.
std::string * sequencesNames
Temporal variable to use in backtranslation option to compare with infile.
Class to calculate the consistency between several MSA containing the same sequences, differently aligned. Using this statistics, the class is able to select the most consistent alignment between all alignments provided. It is possible to forcefully select an alignment, but to calculate the statistics for latter use. After selecting an alignment (most consistent or manually selected), it is possible to use this statistic to trim the alignment, removing columns that are not consistent enough with the other alignments.
char * backtransFile
File to load the alignment containing the backtranslation information.
argumentReport remove_duplicates_argument(const int *argc, char *argv[], int *currentArg)
bool check_output_relevance()
Method to check if, being asked to give an HTML report, it makes logic, depending on the functionalit...
bool check_outputs_coincidence()
Method to check if both output patterns (alignment output and html report output) are the same...
argumentReport back_trans_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the backtranslation argument.
std::ifstream compare
Temporal variable to open files in trimAlManager::check_multiple_files_comparison function...
bool sgt
Flag to show the Accumulated Gaps Scores.
bool sft
Flag to show the Accumulated Sum of Pairs.
float residuesOverlap
Residues Overlap to use while trimming.
char * outfile
File to output the trimmed alignment. This can contain tags which will be traduced to some variables:...
int perform()
Method to perform the analysis if all checks have passed.
argumentReport col_numbering_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the column numbering argument.
int blockSize
Block Size to use while trimming.
argumentReport help_arguments(const int *argc, char **argv, int *currentArg)
Method to parse information arguments as help and menu.
argumentReport seqs_select_argument(const int *argc, char *argv[], int *currentArg)
Method to parse que select sequences argument.
bool automated1
Flag to use the automated1 trimming method.
bool getComplementary
Flag to return the complementary alignment.
bool check_backtranslations()
Method to check backtranslation needs.
bool check_automated_manual_incompatibilities()
Check if only one method, either automatic or manual has been asked.
argumentReport no_all_gaps_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the noallgaps argument.
argumentReport consistency_window_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the Consistency Window argument.
argumentReport compareset_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the comparset argument.
int similarityWindow
Similarity Window to use while trimming.
int * delSequences
Vector that contains the sequence indexes the user specified to be removed.
Class containing an alignment This class stores the alignment sequences with it's names...
argumentReport matrix_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the custom matrix argument.
argumentReport residue_overlap_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the residue overlap argument.
bool noallgaps
Flag to use the noallgaps option.
argumentReport ignore_stop_codon_argument(const int *argc, char *argv[], int *currentArg)
Method to parse ignore by stop codon argument.
argumentReport gap_window_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the Gap Window argument.
Class that contains information of similarity matrices. These are used to calculate the similarity be...
bool check_vcf_incompatibility()
argumentReport svg_out_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the svg output file.
argumentReport similarity_window_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the Similarity Window argument.
argumentReport sequence_overlap_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the sequence overlap argument.
void print_statistics()
Method to print statistics requested.
argumentReport in_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the input file argument.
bool appearErrors
Flag to trace errors.
bool check_force_selection()
Method to check dependency of force select argument.
argumentReport complementary_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the complementary argument.
void CleanResiduesNonAuto()
Method to trim the alignment using non automatic methods:
bool check_codon_behaviour_incompatibility()
Method to check incompatibilities related to how the algorithm should treat stop codons.
char line[256]
Temporal variable to read lines from a file.
int alternative_matrix
Int that represents which alternative matrix to use, where '-1' means no alternative matrix...
bool soverlap
Flag to show overlap scores in the alignment.
std::vector< std::string > oformats
Formats names we are going to output our trimmed alignment.
Alignment * singleAlig
Alignment obtained by making modifications to singleAlig or backtranslationAlig.
Namespace containing all classes related to statistics handling.
argumentReport terminal_only_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the terminal only argument.
argumentReport vcf_argument(const int *argc, char *argv[], int *currentArg)
Method to parse vcf argument.
argumentReport min_quality_argument(const int *argc, char *argv[], int *currentArg)
argumentReport out_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the output file pattern.
void clean_alignment()
Core Method of the program. This is where almost all cleaning methods are called from.
int windowSize
Window Size to use while trimming.
FormatHandling::FormatManager & getFormatManager()
bool check_arguments_needs(char *argv[])
Method that checks dependencies between arguments. Take in mind that dependencies may be between mult...
bool keepSeqs
Flag to keep sequences in the alignment.
bool check_thresholds_incompatibilities()
Method to check incompatibilities with manual thresholds.
statistics::Consistency * CS
float sequenceOverlap
Sequence Overlap to use while trimming.
void check_output_format()
Method to check if an output format has been given. If no output format has been given, it will use the inFile format.
bool check_windows_incompatibilities()
Method to check windows incompatibilities.
argumentReport timetracker_out_argument(const int *argc, char *argv[], int *currentArg)
Method to parse InternalBenchmarker output argument. Need to be checked before any other argument...
int consistencyWindow
Consistency Window to use while trimming.
char * htmlOutFile
File to output the html report.
Alignment * tempAlig
Temporal alignment that allows us to make some changes to trimAlManager::singleAlig, destroy it and set trimAlManager::singleAlig to this.
void menu()
Method to show the menu of the program.
bool sgc
Flag to show the Gaps Scores per column.
std::vector< std::string > * vcfs
char * svgStatsOutFile
File to output the svg graph showing the stats along the alignment.
void examples()
Method to show the examples information about the program.
FormatHandling::FormatManager formatManager
Read Write Machine that allows to manage formats easily.
int clusters
Number of most representative sequences we are going to use.
statistics::similarityMatrix * similMatrix
Temporal Similarity Matrix.
argumentReport gap_threshold_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the gap threshold argument.
bool check_coding_sequences_type()
Method to check the type of sequences present in the backtranslationAlig.
int * sequencesLengths
Vector that contains the sequences lengths of each sequence in the backtranslation option...
bool check_backtranslation_infile_names_correspondence()
Method to check if the origAlig and backtranslationAlig are compatible in names to make the backtrans...
argumentReport clusters_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the clusters argument.
bool gappyout
Flag to use the gappyout trimming method.
char * forceFile
Forcefile to use in combination with multiple files comparison, to compare them against this...
argumentReport consistency_threshold_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the consistency threshold argument.
int gapWindow
Gap Window Size to use while trimming.
bool check_absolute_gap_theshold()
bool sfc
Flag to show the Sum of Pairs scores per column.
bool check_clusters_incompatibilities()
Method to check clusters incompatibilities.
bool nogaps
Flag to use the nogaps option.
argumentReport gappy_out_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the gappyout argument.
size_t argumentLength
Temp variable to use when there is a need to copy an argument to a char array.
int stats
Stats Flag to use in reporting. For each stat requested, this flag is decreased by one...
char c
Temporal char variable.
void check_compareset_window_argument()
Method to check and warn if windowsize and compareset has been given.
bool columnNumbering
Flag to return column numbering in report.
void CleanResiduesAuto()
Method to trim the alignment using automatic or semi-automatic methods:
argumentReport stats_arguments(const int *argc, char *argv[], int *currentArg)
Method to parse stats arguments.
argumentReport svg_stats_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the svg stats output file.
void CleanSequences()
Method to trim or reduce the number of sequences in an alignment. It performs one or none of the foll...
bool check_input_file_with_coding_sequences_argument()
Method to check dependency between custom coding sequence file and infile arguments.
char * matrixFile
File that contains a user defined similarity matrix.
bool performCompareset()
Method to check if multiple files comparison has been set correctly. It also perform some calculation...
bool check_similarity_matrix()
Method to check if given a similarity matrix, there is a need to use it.
argumentReport keep_header_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the keepHeader argument.
bool sident
Flag to show identity scores in the alignment.
Alignment * backtranslationAlig
Alignment used on the backtranslation functionality.
bool check_col_numbering()
Method to check if column numbering makes sense based on the functionality asked. ...
bool check_combinations_among_thresholds_incompatibility()
As some thresholds are incompatible between them, we check their incompatibilities.
Alignment * origAlig
Main alignment used/loaded on trimAl in combination with singleAlig.
argumentReport force_select_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the force select argument.
int i
Argument Iterator Variable.
bool check_output_file_with_statistics()
Method to check if there is an output file to allow statistics to be given on terminal.
argumentReport strict_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the strict argument.
bool check_select_cols_and_seqs_incompatibilities()
Method to check incompatibilities with select cols and select seqs arguments.
bool selectCols
Flag to select columns manually from the alignment.
argumentReport block_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the Block Size argument.
float consistencyThreshold
Consistency Threshold to use while trimming.
bool check_max_identity_incompatibilities()
Method to check max identity incompatibilities.
argumentReport no_gaps_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the nogaps argument.
char ** filesToCompare
Vector containing the files to compare in trimAlManager::check_multiple_files_comparison function...
bool ignoreStopCodon
Flag to use the Ignore Stop Codon option.
bool ssc
Flag to show the Similarity Scores per column.
argumentReport conservation_threshold_argument(const int *argc, char *argv[], int *currentArg)
Method to parse the similarity threshold argument.
argumentReport min_coverage_argument(const int *argc, char *argv[], int *currentArg)
char * svgOutFile
File to output the svg report.
float maxIdentity
Max Identity to use while trimming.
bool check_automated_methods_incompatibilities()
Method to check incompatibilities related to automated trimming methods.
void check_thresholds_dependencies()
Main class of trimAl. It is strutured to work with 3 calls:
int * delColumns
Vector that contains the column indexes the user specified to be removed.
char * infile
File to load the alignment when only one alignment has trimming interest.
int parseArguments(int argc, char **argv)
Method to parse arguments into usable structure in trimal.
Alignment ** compareAlignmentsArray
Alignment Vector used on trimAlManager::check_multiple_files_comparison to compare them...
bool sst
Flag to show the Accumulated Similarity Scores.
bool strictplus
Flag to use the strictplus trimming method.
bool create_or_use_similarity_matrix()
Method to create, load and use a similarity matrix, depending on alignment residue nature...
bool check_block_size()
Method to check if the block size is bigger than allowed depending on size of alignment.