class DadaSEForm(JobDetailsForm): """ Defines the form for the DADA2 single-end pipeline. """ ion_torrent = BooleanField("Check if Ion Torrent sequence", default=False, description=dada_help.ion_torrent_seq) zero_or_g = 'Must be 0 or greater.' trimleft_fwd = IntegerField("Trim left", default=20, description=dada_help.trim_left_fwd_desc, validators=[ neph_validators.greater_than( message=zero_or_g, minimum=-1) ]) truncQ = IntegerField("Truncation quality score", default=4, description=dada_help.tuncq_desc, validators=[ neph_validators.greater_than( message="Must be greater than 0.", minimum=-1) ]) truncLen_fwd = IntegerField("Truncation length", default=0, description=dada_help.truncLen_fwd_desc, validators=[ neph_validators.greater_than( message="Must be greater than 0.", minimum=-1) ]) maxEE = IntegerField("Maximum expected errors", default=5, description=dada_help.maxee_desc, validators=[ neph_validators.greater_than( message="Must be greater than 0.", minimum=-1) ]) chimera = BooleanField("Run chimera removal", default=True, description=dada_help.remove_chimera_desc) taxmethod = SelectField("Taxonomic assigment", default="rdp", description=dada_help.tax_method, choices=[("rdp", "rdp"), ("idtaxa", "IDTAXA")]) sampling_depth = IntegerField( "Sampling depth for downstream analysis", description=dada_help.sampling_depth_desc, validators=[ Optional(), neph_validators.greater_than( message="Must be greater than or equal to 0.", minimum=0) ]) ref_db = SelectField("Reference Database", default="SILVA v132", description=dada_help.ref_db_desc, choices=[("sv99", "SILVA v132"), ("gg97", "Greengenes v13.8"), ("homd", "HOMD")])
class DSAnalysisForm(JobDetailsForm): gt_five = "Input is required, must an integer greater than 5." desc = "The total frequency that each sample should be rarefied to prior "\ "to computing diversity metrics. Samples with counts below this "\ "value will be removed from the analysis." sampling_depth = IntegerField("Sampling depth for downstream analysis", description=desc, validators=[ InputRequired(), neph_validators.greater_than( message=gt_five, minimum=4) ]) red_warn = '<span style="color: red;">Requires Treatment Group column in \ mapping file, after filtering by sampling depth, to contain at least \ 2 groups, and each group to contain at least 2 samples.</span>' link = '<a class="" href="da_details/#input-files-and-parameters" \ target="_blank" rel="noopener noreferrer">More information.</a>' alpha_desc = "Run alpha diversity statistical comparisons between groups, \ and produce alpha diversity plots. {} {}".format(red_warn, link) alpha_group_sig = BooleanField("Run Alpha group significance", default=False, description=alpha_desc)
class QiimeBaseOptions(JobDetailsForm): """ Defines the options that are common to (almost) all QIIME pipes. """ phred_quality = IntegerField( "Minimum phred quality score", default=19, description=qiime_help.qiime_base_phred_qual_desc) phred_offset = IntegerField( "Phred offset", default=33, description=qiime_help.qiime_base_phred_offset_desc) max_n = IntegerField("Maximum ambiguous", default=0, description=qiime_help.qiime_pe_max_ambiguous_desc) max_bad_run = IntegerField( "Max bad run length", default=3, description=qiime_help.qiime_max_bad_run_length_desc) ref_db = SelectField("OTU Picking Database", default="sv99", description=qiime_help.qiime_base_database_desc, choices=[("sv99", "SILVA 99 v132"), ("sv97", "SILVA 97 v132"), ("gg99", "Greengenes 99 v13.5"), ("gg97", "Greengenes 97 v13.5"), ("homd", "HOMD")]) picrust = BooleanField("Run PICRUSt annotations", default=False, description=qiime_help.qiime_picrust_desc) otu_strategy = SelectField( "Analysis type", default="OPEN_REFERENCE", description=qiime_help.qiime_base_analysis_type_desc, choices=[("open", "Open Reference"), ("closed", "Closed Reference"), ("de_novo", "De Novo")]) sampling_depth = IntegerField( "Sampling depth for downstream analysis", description=qiime_help.sampling_depth_desc, validators=[ Optional(), greater_than(message="Must be greater than or equal to 0.", minimum=0) ])
class QiimePEITSForm(JobDetailsForm): """ Defines the form for the QIIME ITS PE pipe. """ phred_quality = IntegerField( "Minimum phred quality score", default=19, description=qiime_help.qiime_base_phred_qual_desc) phred_offset = IntegerField( "Phred offset", default=33, description=qiime_help.qiime_base_phred_offset_desc) max_n = IntegerField("Maximum ambiguous", default=0, description=qiime_help.qiime_pe_max_ambiguous_desc) max_bad_run = IntegerField( "Maximum bad run length", default=3, description=qiime_help.qiime_its_max_bad_run_length_desc) min_overlap = IntegerField("Minimum overlap length", default=10, description=qiime_help.qiime_min_overlap_desc) perc_max_diff = IntegerField( "Percent difference within overlap", default=25, description=qiime_help.qiime_percent_max_diff_desc) ref_db = SelectField("Reference Database", default="ITS_99", description=qiime_help.qiime_its_ref_db_desc, choices=[("its99", "ITS 99"), ("its97", "ITS 97")]) sampling_depth = IntegerField( "Sampling depth for downstream analysis", description=qiime_help.sampling_depth_desc, validators=[ Optional(), greater_than(message="Must be greater than or equal to 0.", minimum=0) ]) otu_strategy = SelectField( "Analysis type", default="OPEN_REFERENCE", description=qiime_help.qiime_base_analysis_type_desc, choices=[("open", "Open Reference"), ("closed", "Closed Reference"), ("de_novo", "De Novo")])
class MothurPEForm(JobDetailsForm): """ Defines the pipeline options form for Mothur FASTQ Paired-End. """ maxlength = IntegerField( "Max length *", default=0, description=mothur_help.mothur_max_seq_length_desc) remove_lineage = MultiDashedCheckboxField( "Remove sequences that belong to taxa of certain lineages", default=["Chloroplast", "Mitochondria", "unknown", "Eukaryote"], description=mothur_help.mothur_remove_lineage_desc, choices=[("Archaea", "Archaea"), ("unknown", "unknown"), ("Chloroplast", "Chloroplast"), ("Mitochondria", "Mitochondria"), ("Eukaryote", "Eukaryote")]) optimize = SelectField( "Optimize", default="start-end", description=mothur_help.mothur_optimize_criteria_desc, choices=[("start-end", "start-end"), ("start", "start"), ("end", "end")]) criteria = IntegerField( "Criteria", default=90, description=mothur_help.mothur_optimize_criteria_desc) ref_db = SelectField("OTU Picking Reference Database", default="SILVA", description=mothur_help.mothur_reference_db_desc, choices=[("sv99", "SILVA 99"), ("homd", "HOMD")]) picrust = BooleanField("Run PICRUSt annotations", default=False, description=mothur_help.mothur_picrust_desc) sampling_depth = IntegerField( "Sampling depth for downstream analysis", description=mothur_help.sampling_depth_desc, validators=[ Optional(), greater_than(message="Must be greater than or equal to 0.", minimum=0) ])