try:
from generator.process import Process
except ImportError:
from assemblerflow.generator.process import Process
[docs]class PatlasMashDist(Process):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.input_type = "fasta"
self.output_type = "json"
self.params = {
"pValue": {
"default": 0.05,
"description": "P-value cutoff for the distance estimation "
"between two sequences to be included in the "
"output."
},
"mash_distance": {
"default": 0.1,
"description": "Sets the maximum distance between two "
"sequences to be included in the output."
},
"shared_hashes": {
"default": 0.8,
"description": "Sets a minimum percentage of hashes shared "
"between two sequences in order to include its "
"result in the output."
},
"refFile": {
"default": "'/ngstools/data/patlas.msh'",
"description": "Specifies the reference file to be provided "
"to mash. It can either be a fasta or a .msh "
"reference sketch generated by mash."
}
}
self.secondary_inputs = [
{
"params": "refFile",
"channel": "IN_reference_file = Channel.value(params.refFile)"
}
]
self.directives = {
"runMashDist": {
"container": "tiagofilipe12/patlasflow_mash_screen",
"version": "1.1"
},
"mashDistOutputJson": {
"container": "tiagofilipe12/patlasflow_mash_screen",
"version": "1.1"
}
}
self.status_channels = [
"runMashDist",
"mashDistOutputJson"
]
[docs]class PatlasMashScreen(Process):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.input_type = "fastq"
self.output_type = "json"
self.params = {
"noWinner": {
"default": "false",
"description": "A variable that enables the use of -w option"
" for mash screen."
},
"pValue": {
"default": 0.05,
"description": "P-value cutoff for the distance estimation "
"between two sequences to be included in the "
"output."
},
"identity": {
"default": 0.9,
"description": "The percentage of identity between the reads "
"input and the reference sequence"
},
"refFile": {
"default": "'/ngstools/data/patlas.msh'",
"description": "Specifies the reference file to be provided "
"to mash. It can either be a fasta or a .msh "
"reference sketch generated by mash."
}
}
self.secondary_inputs = [
{
"params": "refFile",
"channel": "IN_reference_file = Channel.value(params.refFile)"
},
]
self.directives = {
"mashScreen": {
"container": "tiagofilipe12/patlasflow_mash_screen",
"version": "1.1"
},
"mashOutputJson": {
"container": "tiagofilipe12/patlasflow_mash_screen",
"version": "1.1"
}
}
self.status_channels = [
"mashScreen",
"mashOutputJson"
]
self.compiler["patlas_consensus"] = ["mashScreenOutputChannel"]