class InsertSizeMetrics: """InsertSizeMetrics parameters.""" minimum_fraction = FloatField( label="Minimum fraction of reads in a category to be considered", default=0.05, description="When generating the histogram, discard any data " "categories (out of FR, TANDEM, RF) that have fewer than " "this fraction of overall reads (Range: 0 and 0.5).", ) include_duplicates = BooleanField( label="Include reads marked as duplicates in the insert size histogram", default=False, ) deviations = FloatField( label="Deviations limit", default=10.0, description="Generate mean, standard deviation and plots " "by trimming the data down to MEDIAN + DEVIATIONS * " "MEDIAN_ABSOLUTE_DEVIATION. This is done because insert " "size data typically includes enough anomalous values " "from chimeras and other artifacts to make the mean and " "standard deviation grossly misleading regarding the real " "distribution.", )
class Input: """Input fields for InsertSizeMetrics.""" bam = DataField("alignment:bam", label="Alignment BAM file") genome = DataField("seq:nucleotide", label="Genome") minimum_fraction = FloatField( label="Minimum fraction of reads in a category to be considered ", description="When generating the histogram, discard any data " "categories (out of FR, TANDEM, RF) that have fewer than this " "fraction of overall reads (Range: 0 and 0.5).", default=0.05, ) include_duplicates = BooleanField( label= "Include reads marked as duplicates in the insert size histogram", default=False, ) deviations = FloatField( label="Deviations limit", description= "Generate mean, standard deviation and plots by trimming " "the data down to MEDIAN + DEVIATIONS*MEDIAN_ABSOLUTE_DEVIATION. " "This is done because insert size data typically includes enough " "anomalous values from chimeras and other artifacts to make the " "mean and standard deviation grossly misleading regarding the real " "distribution.", default=10.0, ) validation_stringency = StringField( label="Validation stringency", description="Validation stringency for all SAM files read by this " "program. Setting stringency to SILENT can improve " "performance when processing a BAM file in which " "variable-length data (read, qualities, tags) do not " "otherwise need to be decoded. Default is STRICT.", choices=[ ("STRICT", "STRICT"), ("LENIENT", "LENIENT"), ("SILENT", "SILENT"), ], default="STRICT", ) assume_sorted = BooleanField( label="Sorted BAM file", description= "If True, the sort order in the header file will be ignored.", default=False, )
class Input: """Input fields for BsConversionRate.""" mr = DataField( "alignment:bam:walt", label="Aligned reads from bisulfite sequencing", description="Bisulfite specifc alignment such as WALT is required as .mr file type is used. Duplicates" "should be removed to reduce any bias introduced by incomplete conversion on PCR duplicate" "reads.", ) skip = BooleanField( label="Skip Bisulfite conversion rate step", description="Bisulfite conversion rate step can be skipped.", default=False, ) sequence = DataField( "seq:nucleotide", label="Unmethylated control sequence", description="Separate unmethylated control sequence FASTA file is required to estimate bisulfite" "conversion rate.", required=False, ) count_all = BooleanField( label="Count all cytosines including CpGs", default=True ) read_length = IntegerField(label="Average read length", default=150) max_mismatch = FloatField( label="Maximum fraction of mismatches", required=False ) a_rich = BooleanField(label="Reads are A-rich", default=False)
class Input: """Input fields.""" my_field = StringField(label="My field") my_list = ListField(StringField(), label="My list") input_data = DataField("test:save", label="My input data") input_entity_data = DataField("entity", label="My entity data") bar = DataField(data_type="test:save", label="My bar") url = UrlField(UrlField.DOWNLOAD, label="My URL") integer = IntegerField(label="My integer") my_float = FloatField(label="My float") my_json = JsonField(label="Blah blah") my_optional = StringField(label="Optional", required=False, default="default value") my_optional_no_default = StringField(label="Optional no default", required=False) class MyGroup: foo = IntegerField(label="Foo") bar = StringField(label="Bar") group_optional_no_default = StringField( label="Group optional no default", required=False) my_group = GroupField(MyGroup, label="My group")
class FilterOptions: """Filtering options.""" count = BooleanField( label="Filter genes based on expression count", default=True, ) min_count_sum = IntegerField( label="Minimum gene expression count summed over all samples", default=10, description="Filter genes in the expression matrix input. " "Remove genes where the expression count sum over all samples " "is below the threshold.", hidden="!filter_options.count", ) cook = BooleanField( label="Filter genes based on Cook's distance", default=False, ) cooks_cutoff = FloatField( label="Threshold on Cook's distance", required=False, description="If one or more samples have Cook's distance " "larger than the threshold set here, the p-value for the row " "is set to NA. If left empty, the default threshold of 0.99 " "quantile of the F(p, m-p) distribution is used, where p is " "the number of coefficients being fitted and m is the number " "of samples. This test excludes Cook's distance of samples " "belonging to experimental groups with only two samples.", hidden="!filter_options.cook", ) independent = BooleanField( label="Apply independent gene filtering", default=False, ) alpha = FloatField( label="Significance cut-off used for optimizing independent " "gene filtering", default=0.1, description="The value should be set to adjusted p-value " "cut-off (FDR).", hidden="!filter_options.independent", )
class Input: """Input fields to process EdgeR.""" case = ListField( DataField("expression"), label="Case", description="Case samples (replicates)", ) control = ListField( DataField("expression"), label="Control", description="Control samples (replicates)", ) count_filter = IntegerField( label="Raw counts filtering threshold", default=10, description="Filter genes in the expression matrix input. " "Remove genes where the number of counts in all samples is " "below the threshold.", ) create_sets = BooleanField( label="Create gene sets", description="After calculating differential gene " "expressions create gene sets for up-regulated genes, " "down-regulated genes and all genes.", default=False, ) logfc = FloatField( label="Log2 fold change threshold for gene sets", description="Genes above Log2FC are considered as " "up-regulated and genes below -Log2FC as down-regulated.", default=1.0, hidden="!create_sets", ) fdr = FloatField( label="FDR threshold for gene sets", default=0.05, hidden="!create_sets", )
class Options: """Options.""" intervals = DataField( "bed", label= "Use intervals BED file to limit the analysis to the specified parts of the genome.", required=False, ) contamination = FloatField( label="Contamination fraction", default=0, description= "Fraction of contamination in sequencing data (for all samples) to aggressively remove.", )
class Input: """Input fields for CollectRrbsMetrics.""" bam = DataField("alignment:bam", label="Alignment BAM file") genome = DataField("seq:nucleotide", label="Genome") min_quality = IntegerField( label= "Threshold for base quality of a C base before it is considered", default=20, ) next_base_quality = IntegerField( label= "Threshold for quality of a base next to a C before the C base is considered", default=10, ) min_lenght = IntegerField(label="Minimum read length", default=5) mismatch_rate = FloatField( label= "Maximum fraction of mismatches in a read to be considered (Range: 0 and 1)", default=0.1, ) validation_stringency = StringField( label="Validation stringency", description="Validation stringency for all SAM files read by this " "program. Setting stringency to SILENT can improve " "performance when processing a BAM file in which " "variable-length data (read, qualities, tags) do not " "otherwise need to be decoded. Default is STRICT.", choices=[ ("STRICT", "STRICT"), ("LENIENT", "LENIENT"), ("SILENT", "SILENT"), ], default="STRICT", ) assume_sorted = BooleanField( label="Sorted BAM file", description= "If true the sort order in the header file will be ignored.", default=False, )
class Input: """Input fields.""" alignment = DataField("alignment:bam", label="Alignment BAM file") bedpe = DataField( "bedpe", label="BEDPE Normalization factor", description="The BEDPE file describes disjoint genome features, " "such as structural variations or paired-end sequence alignments. " "It is used to estimate the scale factor.", ) scale = FloatField( label="Scale for the normalization factor", description="Magnitude of the scale factor. " "The scaling factor is calculated by dividing the scale " "with the number of features in BEDPE " "(scale/(number of features)).", default=10000, )
class AdapterTrimming: """Adapter trimming options.""" adapter = ListField( StringField(), label="Read 1 adapter sequence", description="Adapter sequences to be trimmed. " "Also see universal adapters field for predefined " "adapters. This is mutually exclusive with read 1 " "adapters file and universal adapters.", required=False, default=[], ) adapter_2 = ListField( StringField(), label="Read 2 adapter sequence", description="Optional adapter sequence to be trimmed " "off read 2 of paired-end files. This is mutually " "exclusive with read 2 adapters file and universal " "adapters.", required=False, default=[], ) adapter_file_1 = DataField( "seq:nucleotide", label="Read 1 adapters file", description="This is mutually exclusive with read 1 " "adapters and universal adapters.", required=False, ) adapter_file_2 = DataField( "seq:nucleotide", label="Read 2 adapters file", description="This is mutually exclusive with read 2 " "adapters and universal adapters.", required=False, ) universal_adapter = StringField( label="Universal adapters", description="Instead of default detection use specific " "adapters. Use 13bp of the Illumina universal adapter, " "12bp of the Nextera adapter or 12bp of the Illumina " "Small RNA 3' Adapter. Selecting to trim smallRNA " "adapters will also lower the length value to 18bp. " "If the smallRNA libraries are paired-end then read 2 " "adapter will be set to the Illumina small RNA 5' " "adapter automatically (GATCGTCGGACT) unless defined " "explicitly. This is mutually exclusive with manually " "defined adapters and adapter files.", choices=[ ("--illumina", "Illumina"), ("--nextera", "Nextera"), ("--small_rna", "Illumina small RNA"), ], required=False, ) stringency = IntegerField( label="Overlap with adapter sequence required to trim", description="Defaults to a very stringent setting of " "1, i.e. even a single base pair of overlapping " "sequence will be trimmed of the 3' end of any read.", default=1, ) error_rate = FloatField( label="Maximum allowed error rate", description="Number of errors divided by the length of " "the matching region", default=0.1, )
class Input: """Input fields to process Deseq.""" case = ListField( DataField("expression"), label="Case", description="Case samples (replicates)", ) control = ListField( DataField("expression"), label="Control", description="Control samples (replicates)", ) create_sets = BooleanField( label="Create gene sets", description="After calculating differential gene " "expressions create gene sets for up-regulated genes, " "down-regulated genes and all genes.", default=False, ) logfc = FloatField( label="Log2 fold change threshold for gene sets", description="Genes above Log2FC are considered as " "up-regulated and genes below -Log2FC as down-regulated.", default=1.0, hidden="!create_sets", ) fdr = FloatField( label="FDR threshold for gene sets", default=0.05, hidden="!create_sets", ) class Options: """Options.""" beta_prior = BooleanField( label="Beta prior", default=False, description="Whether or not to put a zero-mean normal prior " "on the non-intercept coefficients.", ) class FilterOptions: """Filtering options.""" count = BooleanField( label="Filter genes based on expression count", default=True, ) min_count_sum = IntegerField( label="Minimum gene expression count summed over all samples", default=10, description="Filter genes in the expression matrix input. " "Remove genes where the expression count sum over all samples " "is below the threshold.", hidden="!filter_options.count", ) cook = BooleanField( label="Filter genes based on Cook's distance", default=False, ) cooks_cutoff = FloatField( label="Threshold on Cook's distance", required=False, description="If one or more samples have Cook's distance " "larger than the threshold set here, the p-value for the row " "is set to NA. If left empty, the default threshold of 0.99 " "quantile of the F(p, m-p) distribution is used, where p is " "the number of coefficients being fitted and m is the number " "of samples. This test excludes Cook's distance of samples " "belonging to experimental groups with only two samples.", hidden="!filter_options.cook", ) independent = BooleanField( label="Apply independent gene filtering", default=False, ) alpha = FloatField( label="Significance cut-off used for optimizing independent " "gene filtering", default=0.1, description="The value should be set to adjusted p-value " "cut-off (FDR).", hidden="!filter_options.independent", ) options = GroupField(Options, label="Gene filtering options") filter_options = GroupField( FilterOptions, label="Differential expression analysis options")
class AdvancedOptions: """Advanced options.""" use_as_anno = BooleanField( label="--use-allele-specific-annotations", default=False ) indel_anno_fields = ListField( StringField(), label="Annotation fields (INDEL filtering)", default=[ "FS", "ReadPosRankSum", "MQRankSum", "QD", "SOR", "DP", ], ) snp_anno_fields = ListField( StringField(), label="Annotation fields (SNP filtering)", default=[ "QD", "MQRankSum", "ReadPosRankSum", "FS", "MQ", "SOR", "DP", ], ) indel_filter_level = FloatField( label="--truth-sensitivity-filter-level (INDELs)", default=99.0 ) snp_filter_level = FloatField( label="--truth-sensitivity-filter-level (SNPs)", default=99.7 ) max_gaussians_indels = IntegerField( label="--max-gaussians (INDELs)", default=4, description="This parameter determines the maximum number " "of Gaussians that should be used when building a positive " "model using the variational Bayes algorithm. This parameter " "sets the expected number of clusters in modeling. If a " "dataset gives fewer distinct clusters, e.g. as can happen " "for smaller data, then the tool will tell you there is " "insufficient data with a No data found error message. " "In this case, try decrementing the --max-gaussians value.", ) max_gaussians_snps = IntegerField( label="--max-gaussians (SNPs)", default=6, description="This parameter determines the maximum number " "of Gaussians that should be used when building a positive " "model using the variational Bayes algorithm. This parameter " "sets the expected number of clusters in modeling. If a " "dataset gives fewer distinct clusters, e.g. as can happen " "for smaller data, then the tool will tell you there is " "insufficient data with a No data found error message. " "In this case, try decrementing the --max-gaussians value.", )
class Options: """Options.""" stranded = StringField( label="Assay type", default="A", choices=[ ("A", "Detect automatically"), ("U", "Strand non-specific (U)"), ("SF", "Strand-specific forward (SF)"), ("SR", "Strand-specific reverse (SR)"), ("IU", "Strand non-specific (paired-end IU)"), ("ISF", "Strand-specific forward (paired-end ISF)"), ("ISR", "Strand-specific reverse (paired-end (ISR)"), ], ) seq_bias = BooleanField( label="--seqBias", default=False, description="Perform sequence-specific bias correction.", ) gc_bias = BooleanField( label="--gcBias", default=False, description= "[beta for single-end reads] Perform fragment GC bias correction.", ) discard_orphans_quasi = BooleanField( label="--discardOrphansQuasi", default=False, description="Discard orphan mappings in quasi-mapping mode. " "If this flag is passed then only paired " "mappings will be considered toward " "quantification estimates. The default " "behavior is to consider orphan mappings " "if no valid paired mappings exist.", ) no_length_correction = BooleanField( label="--noLengthCorrection", default=False, description="[Experimental] Entirely disables " "length correction when estimating the " "abundance of transcripts. The abundance " "estimates are reported in CPM (counts per " "million) unit. This option can be used " "with protocols where one expects that " "fragments derive from their underlying " "targets without regard to that target's " "length (e.g. QuantSeq).", ) consensus_slack = FloatField( label="--consensusSlack", required=False, description="The amount of slack allowed in the quasi-mapping " "consensus mechanism. Normally, a transcript must " "cover all hits to be considered for mapping. " "If this is set to a fraction, X, greater than 0 " "(and in [0,1)), then a transcript can fail " "to cover up to (100 * X)% of the hits before it " "is discounted as a mapping candidate. The default " "value of this option is 0.2 in selective alignment mode " "and 0 otherwise.", ) min_score_fraction = FloatField( label="--minScoreFraction", default=0.65, description="The fraction of the optimal possible alignment " "score that a mapping must achieve in order to be " "considered valid - should be in (0,1]", ) incompat_prior = FloatField( label="---incompatPrior", default=0, description="This option sets the prior probability " "that an alignment that disagrees with " "the specified library type (--libType) " "results from the true fragment origin. " "Setting this to 0 specifies that " "alignments that disagree with the " "library type should be impossible, " "while setting it to 1 says that " "alignments that disagree with the " "library type are no less likely than " "those that do.", ) range_factorization_bins = IntegerField( label="--rangeFactorizationBins", default=4, description="Factorizes the likelihood used in " "quantification by adopting a new notion " "of equivalence classes based on the " "conditional probabilities with which " "fragments are generated from different " "transcripts. This is a more " "fine-grained factorization than the " "normal rich equivalence classes. The " "default value (4) corresponds to the " "default used in Zakeri et al. 2017 " "and larger values imply a more " "fine-grained factorization. If range " "factorization is enabled, a common " "value to select for this parameter is " "4. A value of 0 signifies the use of " "basic rich equivalence classes.", ) min_assigned_frag = IntegerField( label="--minAssignedFrags", default=10, description="The minimum number of fragments that " "must be assigned to the transcriptome " "for quantification to proceed.", )
class Input: """Input fields to process MergeData.""" string_field = StringField( label="Labels are short and do not end in a period", description="Description ends in a period.", choices=[ ("computer_readable1", "Human readable 1"), ("computer_readable2", "Human readable 2"), ], default="computer_readable1", required=False, hidden=False, allow_custom_choice=True, ) text_field = TextField( label="Labels are short and do not end in a period", description="Description ends in a period.", default="default text", required=False, hidden=True, ) boolean_field1 = BooleanField( label="Labels are short and do not end in a period", description="Note that description fields always end in a period.", default=False, required=True, hidden=False, ) integer_field = IntegerField( label="Labels are short and do not end in a period", description="Description ends in a period.", default=1, ) float_field = FloatField( label="Labels are short and do not end in a period", description="Description ends in a period.", default=3.14, ) date_field = DateField( label="Labels are short and do not end in a period", description="Description ends in a period.", default="2020-04-20", ) datetime_field = DateTimeField( label="Labels are short and do not end in a period", description="Description ends in a period.", default="2020-04-20 12:16:00", ) url_field = UrlField( label="Labels are short and do not end in a period", description="Description ends in a period.", ) secret_field = SecretField( label="Labels are short and do not end in a period", description="Description ends in a period.", ) file_field = FileField( label="Labels are short and do not end in a period", description="Description ends in a period.", ) filehtml_field = FileHtmlField( label="Labels are short and do not end in a period", description="Description ends in a period.", ) dir_field = DirField( label="Labels are short and do not end in a period", description="Description ends in a period.", ) json_field = JsonField( label="Labels are short and do not end in a period", description="Description ends in a period.", ) list_field = ListField( DataField(data_type="your:data:type"), label="Labels are short and do not end in a period", description="Description ends in a period.", ) data_field = DataField( # data_type should not start with data: data_type="your:data:type", label="Labels are short and do not end in a period", description="Description ends in a period.", ) class Advanced: """Add advanced list of options.""" boolean_field2 = BooleanField( label="Labels are short and do not end in a period", description="Description ends in a period.", default=False, ) group_field = GroupField( Advanced, label="Labels are short and do not end in a period", disabled=False, # Will show when boolean_field1 is flipped. hidden="!boolean_field1", collapsed=True, )
class Input: """Input fields to process Cuffdiff.""" case = ListField( DataField("cufflinks:cuffquant"), label="Case samples", ) control = ListField( DataField("cufflinks:cuffquant"), label="Control samples", ) labels = ListField( StringField(), label="Group labels", description="Define labels for each sample group.", default=["control", "case"], ) annotation = DataField( "annotation", label="Annotation (GTF/GFF3)", description="A transcript annotation file produced by " "cufflinks, cuffcompare, or other tool.", ) genome = DataField( "seq:nucleotide", label="Run bias detection and correction algorithm", required=False, description="Provide Cufflinks with a multifasta file " "(genome file) via this option to instruct it to run a " "bias detection and correction algorithm which can " "significantly improve accuracy of transcript abundance " "estimates.", ) multi_read_correct = BooleanField( label="Do initial estimation procedure to more accurately " "weight reads with multiple genome mappings", default=False, ) create_sets = BooleanField( label="Create gene sets", description="After calculating differential gene " "expressions create gene sets for up-regulated genes, " "down-regulated genes and all genes.", default=False, ) gene_logfc = FloatField( label="Log2 fold change threshold for gene sets", description="Genes above Log2FC are considered as " "up-regulated and genes below -Log2FC as down-regulated.", default=1.0, hidden="!create_sets", ) gene_fdr = FloatField( label="FDR threshold for gene sets", default=0.05, hidden="!create_sets", ) fdr = FloatField( label="Allowed FDR", description= "The allowed false discovery rate. The default is 0.05.", default=0.05, ) library_type = StringField( label="Library type", description="In cases where Cufflinks cannot determine the " "platform and protocol used to generate input reads, you " "can supply this information manually, which will allow " "Cufflinks to infer source strand information with certain " "protocols. The available options are listed below. For " "paired-end data, we currently only support protocols " "where reads point towards each other: fr-unstranded - " "Reads from the left-most end of the fragment (in " "transcript coordinates) map to the transcript strand and " "the right-most end maps to the opposite strand; " "fr-firststrand - Same as above except we enforce the rule " "that the right-most end of the fragment (in transcript " "coordinates) is the first sequenced (or only sequenced " "for single-end reads). Equivalently, it is assumed that " "only the strand generated during first strand synthesis " "is sequenced; fr-secondstrand - Same as above except we " "enforce the rule that the left-most end of the fragment " "(in transcript coordinates) is the first sequenced (or " "only sequenced for single-end reads). Equivalently, it is " "assumed that only the strand generated during second " "strand synthesis is sequenced.", default="fr-unstranded", choices=[ ("fr-unstranded", "fr-unstranded"), ("fr-firststrand", "fr-firststrand"), ("fr-secondstrand", "fr-secondstrand"), ], ) library_normalization = StringField( label="Library normalization method", description="You can control how library sizes (i.e. " "sequencing depths) are normalized in Cufflinks and " "Cuffdiff. Cuffdiff has several methods that require " "multiple libraries in order to work. Library " "normalization methods supported by Cufflinks work on one " "library at a time.", default="geometric", choices=[ ("geometric", "geometric"), ("classic-fpkm", "classic-fpkm"), ("quartile", "quartile"), ], ) dispersion_method = StringField( label="Dispersion method", description=" Cuffdiff works by modeling the variance in " "fragment counts across replicates as a function of the " "mean fragment count across replicates. Strictly speaking, " "models a quantitity called dispersion - the variance " "present in a group of samples beyond what is expected " "from a simple Poisson model of RNA_Seq. You can control " "how Cuffdiff constructs its model of dispersion in locus " "fragment counts. Each condition that has replicates can " "receive its own model, or Cuffdiff can use a global model " "for all conditions. All of these policies are identical " "to those used by DESeq (Anders and Huber, Genome Biology, " "2010).", default="pooled", choices=[ ("pooled", "pooled"), ("per-condition", "per-condition"), ("blind", "blind"), ("poisson", "poisson"), ], )