partition stringclasses 3
values | func_name stringlengths 1 134 | docstring stringlengths 1 46.9k | path stringlengths 4 223 | original_string stringlengths 75 104k | code stringlengths 75 104k | docstring_tokens listlengths 1 1.97k | repo stringlengths 7 55 | language stringclasses 1
value | url stringlengths 87 315 | code_tokens listlengths 19 28.4k | sha stringlengths 40 40 |
|---|---|---|---|---|---|---|---|---|---|---|---|
test | Process.set_channels | General purpose method that sets the main channels
This method will take a variable number of keyword arguments to
set the :py:attr:`Process._context` attribute with the information
on the main channels for the process. This is done by appending
the process ID (:py:attr:`Process.pid`) a... | flowcraft/generator/process.py | def set_channels(self, **kwargs):
""" General purpose method that sets the main channels
This method will take a variable number of keyword arguments to
set the :py:attr:`Process._context` attribute with the information
on the main channels for the process. This is done by appending
... | def set_channels(self, **kwargs):
""" General purpose method that sets the main channels
This method will take a variable number of keyword arguments to
set the :py:attr:`Process._context` attribute with the information
on the main channels for the process. This is done by appending
... | [
"General",
"purpose",
"method",
"that",
"sets",
"the",
"main",
"channels"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/process.py#L444-L487 | [
"def",
"set_channels",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"not",
"self",
".",
"pid",
":",
"self",
".",
"pid",
"=",
"\"{}_{}\"",
".",
"format",
"(",
"self",
".",
"lane",
",",
"kwargs",
".",
"get",
"(",
"\"pid\"",
")",
")",
"for"... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Process.update_main_forks | Updates the forks attribute with the sink channel destination
Parameters
----------
sink : str
Channel onto which the main input will be forked to | flowcraft/generator/process.py | def update_main_forks(self, sink):
"""Updates the forks attribute with the sink channel destination
Parameters
----------
sink : str
Channel onto which the main input will be forked to
"""
if not self.main_forks:
self.main_forks = [self.output_c... | def update_main_forks(self, sink):
"""Updates the forks attribute with the sink channel destination
Parameters
----------
sink : str
Channel onto which the main input will be forked to
"""
if not self.main_forks:
self.main_forks = [self.output_c... | [
"Updates",
"the",
"forks",
"attribute",
"with",
"the",
"sink",
"channel",
"destination"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/process.py#L494-L516 | [
"def",
"update_main_forks",
"(",
"self",
",",
"sink",
")",
":",
"if",
"not",
"self",
".",
"main_forks",
":",
"self",
".",
"main_forks",
"=",
"[",
"self",
".",
"output_channel",
"]",
"self",
".",
"output_channel",
"=",
"\"_{}\"",
".",
"format",
"(",
"self... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Process.set_secondary_channel | General purpose method for setting a secondary channel
This method allows a given source channel to be forked into one or
more channels and sets those forks in the :py:attr:`Process.forks`
attribute. Both the source and the channels in the ``channel_list``
argument must be the final cha... | flowcraft/generator/process.py | def set_secondary_channel(self, source, channel_list):
""" General purpose method for setting a secondary channel
This method allows a given source channel to be forked into one or
more channels and sets those forks in the :py:attr:`Process.forks`
attribute. Both the source and the chan... | def set_secondary_channel(self, source, channel_list):
""" General purpose method for setting a secondary channel
This method allows a given source channel to be forked into one or
more channels and sets those forks in the :py:attr:`Process.forks`
attribute. Both the source and the chan... | [
"General",
"purpose",
"method",
"for",
"setting",
"a",
"secondary",
"channel"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/process.py#L518-L567 | [
"def",
"set_secondary_channel",
"(",
"self",
",",
"source",
",",
"channel_list",
")",
":",
"logger",
".",
"debug",
"(",
"\"Setting secondary channel for source '{}': {}\"",
".",
"format",
"(",
"source",
",",
"channel_list",
")",
")",
"source",
"=",
"\"{}_{}\"",
".... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Process.update_attributes | Updates the directives attribute from a dictionary object.
This will only update the directives for processes that have been
defined in the subclass.
Parameters
----------
attr_dict : dict
Dictionary containing the attributes that will be used to update
... | flowcraft/generator/process.py | def update_attributes(self, attr_dict):
"""Updates the directives attribute from a dictionary object.
This will only update the directives for processes that have been
defined in the subclass.
Parameters
----------
attr_dict : dict
Dictionary containing the ... | def update_attributes(self, attr_dict):
"""Updates the directives attribute from a dictionary object.
This will only update the directives for processes that have been
defined in the subclass.
Parameters
----------
attr_dict : dict
Dictionary containing the ... | [
"Updates",
"the",
"directives",
"attribute",
"from",
"a",
"dictionary",
"object",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/process.py#L569-L608 | [
"def",
"update_attributes",
"(",
"self",
",",
"attr_dict",
")",
":",
"# Update directives",
"# Allowed attributes to write",
"valid_directives",
"=",
"[",
"\"pid\"",
",",
"\"ignore_type\"",
",",
"\"ignore_pid\"",
",",
"\"extra_input\"",
",",
"\"group\"",
",",
"\"input_t... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Compiler.set_compiler_channels | General method for setting the input channels for the status process
Given a list of status channels that are gathered during the pipeline
construction, this method will automatically set the input channel
for the status process. This makes use of the ``mix`` channel operator
of nextflo... | flowcraft/generator/process.py | def set_compiler_channels(self, channel_list, operator="mix"):
"""General method for setting the input channels for the status process
Given a list of status channels that are gathered during the pipeline
construction, this method will automatically set the input channel
for the status ... | def set_compiler_channels(self, channel_list, operator="mix"):
"""General method for setting the input channels for the status process
Given a list of status channels that are gathered during the pipeline
construction, this method will automatically set the input channel
for the status ... | [
"General",
"method",
"for",
"setting",
"the",
"input",
"channels",
"for",
"the",
"status",
"process"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/process.py#L622-L673 | [
"def",
"set_compiler_channels",
"(",
"self",
",",
"channel_list",
",",
"operator",
"=",
"\"mix\"",
")",
":",
"if",
"not",
"channel_list",
":",
"raise",
"eh",
".",
"ProcessError",
"(",
"\"At least one status channel must be \"",
"\"provided to include this process in the \... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Init.set_raw_inputs | Sets the main input channels of the pipeline and their forks.
The ``raw_input`` dictionary input should contain one entry for each
input type (fastq, fasta, etc). The corresponding value should be a
dictionary/json with the following key:values:
- ``channel``: Name of the raw input cha... | flowcraft/generator/process.py | def set_raw_inputs(self, raw_input):
"""Sets the main input channels of the pipeline and their forks.
The ``raw_input`` dictionary input should contain one entry for each
input type (fastq, fasta, etc). The corresponding value should be a
dictionary/json with the following key:values:
... | def set_raw_inputs(self, raw_input):
"""Sets the main input channels of the pipeline and their forks.
The ``raw_input`` dictionary input should contain one entry for each
input type (fastq, fasta, etc). The corresponding value should be a
dictionary/json with the following key:values:
... | [
"Sets",
"the",
"main",
"input",
"channels",
"of",
"the",
"pipeline",
"and",
"their",
"forks",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/process.py#L687-L737 | [
"def",
"set_raw_inputs",
"(",
"self",
",",
"raw_input",
")",
":",
"logger",
".",
"debug",
"(",
"\"Setting raw inputs using raw input dict: {}\"",
".",
"format",
"(",
"raw_input",
")",
")",
"primary_inputs",
"=",
"[",
"]",
"for",
"input_type",
",",
"el",
"in",
... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Init.set_secondary_inputs | Adds secondary inputs to the start of the pipeline.
This channels are inserted into the pipeline file as they are
provided in the values of the argument.
Parameters
----------
channel_dict : dict
Each entry should be <parameter>: <channel string>. | flowcraft/generator/process.py | def set_secondary_inputs(self, channel_dict):
""" Adds secondary inputs to the start of the pipeline.
This channels are inserted into the pipeline file as they are
provided in the values of the argument.
Parameters
----------
channel_dict : dict
Each entry s... | def set_secondary_inputs(self, channel_dict):
""" Adds secondary inputs to the start of the pipeline.
This channels are inserted into the pipeline file as they are
provided in the values of the argument.
Parameters
----------
channel_dict : dict
Each entry s... | [
"Adds",
"secondary",
"inputs",
"to",
"the",
"start",
"of",
"the",
"pipeline",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/process.py#L739-L755 | [
"def",
"set_secondary_inputs",
"(",
"self",
",",
"channel_dict",
")",
":",
"logger",
".",
"debug",
"(",
"\"Setting secondary inputs: {}\"",
".",
"format",
"(",
"channel_dict",
")",
")",
"secondary_input_str",
"=",
"\"\\n\"",
".",
"join",
"(",
"list",
"(",
"chann... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Init.set_extra_inputs | Sets the initial definition of the extra input channels.
The ``channel_dict`` argument should contain the input type and
destination channel of each parameter (which is the key)::
channel_dict = {
"param1": {
"input_type": "fasta"
"ch... | flowcraft/generator/process.py | def set_extra_inputs(self, channel_dict):
"""Sets the initial definition of the extra input channels.
The ``channel_dict`` argument should contain the input type and
destination channel of each parameter (which is the key)::
channel_dict = {
"param1": {
... | def set_extra_inputs(self, channel_dict):
"""Sets the initial definition of the extra input channels.
The ``channel_dict`` argument should contain the input type and
destination channel of each parameter (which is the key)::
channel_dict = {
"param1": {
... | [
"Sets",
"the",
"initial",
"definition",
"of",
"the",
"extra",
"input",
"channels",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/process.py#L757-L800 | [
"def",
"set_extra_inputs",
"(",
"self",
",",
"channel_dict",
")",
":",
"extra_inputs",
"=",
"[",
"]",
"for",
"param",
",",
"info",
"in",
"channel_dict",
".",
"items",
"(",
")",
":",
"# Update the process' parameters with the raw input",
"raw_channel",
"=",
"self",... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | main | Main executor of the process_mapping template.
Parameters
----------
sample_id : str
Sample Identification string.
assembly: str
Path to the fatsa file generated by the assembler.
minsize: str
Min contig size to be considered a complete ORF | flowcraft/templates/process_viral_assembly.py | def main(sample_id, assembly_file, minsize):
"""Main executor of the process_mapping template.
Parameters
----------
sample_id : str
Sample Identification string.
assembly: str
Path to the fatsa file generated by the assembler.
minsize: str
Min contig size to be consider... | def main(sample_id, assembly_file, minsize):
"""Main executor of the process_mapping template.
Parameters
----------
sample_id : str
Sample Identification string.
assembly: str
Path to the fatsa file generated by the assembler.
minsize: str
Min contig size to be consider... | [
"Main",
"executor",
"of",
"the",
"process_mapping",
"template",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/process_viral_assembly.py#L451-L562 | [
"def",
"main",
"(",
"sample_id",
",",
"assembly_file",
",",
"minsize",
")",
":",
"logger",
".",
"info",
"(",
"\"Starting assembly file processing\"",
")",
"warnings",
"=",
"[",
"]",
"fails",
"=",
"\"\"",
"# Parse the spades assembly file and perform the first filtering.... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Assembly._parse_coverage | Attempts to retrieve the coverage value from the header string.
It splits the header by "_" and then screens the list backwards in
search of the first float value. This will be interpreted as the
coverage value. If it cannot find a float value, it returns None.
This search methodology i... | flowcraft/templates/process_viral_assembly.py | def _parse_coverage(header_str):
"""Attempts to retrieve the coverage value from the header string.
It splits the header by "_" and then screens the list backwards in
search of the first float value. This will be interpreted as the
coverage value. If it cannot find a float value, it ret... | def _parse_coverage(header_str):
"""Attempts to retrieve the coverage value from the header string.
It splits the header by "_" and then screens the list backwards in
search of the first float value. This will be interpreted as the
coverage value. If it cannot find a float value, it ret... | [
"Attempts",
"to",
"retrieve",
"the",
"coverage",
"value",
"from",
"the",
"header",
"string",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/process_viral_assembly.py#L144-L174 | [
"def",
"_parse_coverage",
"(",
"header_str",
")",
":",
"cov",
"=",
"None",
"for",
"i",
"in",
"header_str",
".",
"split",
"(",
"\"_\"",
")",
"[",
":",
":",
"-",
"1",
"]",
":",
"try",
":",
"cov",
"=",
"float",
"(",
"i",
")",
"break",
"except",
"Val... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Assembly._parse_assembly | Parse an assembly fasta file.
This is a Fasta parsing method that populates the
:py:attr:`~Assembly.contigs` attribute with data for each contig in the
assembly.
The insertion of data on the self.contigs is done by the
:py:meth:`Assembly._populate_contigs` method, which also ca... | flowcraft/templates/process_viral_assembly.py | def _parse_assembly(self, assembly_file):
"""Parse an assembly fasta file.
This is a Fasta parsing method that populates the
:py:attr:`~Assembly.contigs` attribute with data for each contig in the
assembly.
The insertion of data on the self.contigs is done by the
:py:me... | def _parse_assembly(self, assembly_file):
"""Parse an assembly fasta file.
This is a Fasta parsing method that populates the
:py:attr:`~Assembly.contigs` attribute with data for each contig in the
assembly.
The insertion of data on the self.contigs is done by the
:py:me... | [
"Parse",
"an",
"assembly",
"fasta",
"file",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/process_viral_assembly.py#L176-L242 | [
"def",
"_parse_assembly",
"(",
"self",
",",
"assembly_file",
")",
":",
"# Temporary storage of sequence data",
"seq_temp",
"=",
"[",
"]",
"# Id counter for contig that will serve as key in self.contigs",
"contig_id",
"=",
"0",
"# Initialize kmer coverage and header",
"cov",
","... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Assembly._populate_contigs | Inserts data from a single contig into\
:py:attr:`~Assembly.contigs`.
By providing a contig id, the original header, the coverage that
is parsed from the header and the sequence, this method will
populate the :py:attr:`~Assembly.contigs` attribute.
Parameters
---------... | flowcraft/templates/process_viral_assembly.py | def _populate_contigs(self, contig_id, header, cov, sequence):
""" Inserts data from a single contig into\
:py:attr:`~Assembly.contigs`.
By providing a contig id, the original header, the coverage that
is parsed from the header and the sequence, this method will
populate the :p... | def _populate_contigs(self, contig_id, header, cov, sequence):
""" Inserts data from a single contig into\
:py:attr:`~Assembly.contigs`.
By providing a contig id, the original header, the coverage that
is parsed from the header and the sequence, this method will
populate the :p... | [
"Inserts",
"data",
"from",
"a",
"single",
"contig",
"into",
"\\",
":",
"py",
":",
"attr",
":",
"~Assembly",
".",
"contigs",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/process_viral_assembly.py#L244-L278 | [
"def",
"_populate_contigs",
"(",
"self",
",",
"contig_id",
",",
"header",
",",
"cov",
",",
"sequence",
")",
":",
"# Get AT/GC/N counts and proportions.",
"# Note that self._get_gc_content returns a dictionary with the",
"# information on the GC/AT/N counts and proportions. This makes... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Assembly._get_gc_content | Get GC content and proportions.
Parameters
----------
sequence : str
The complete sequence of the contig.
length : int
The length of the sequence contig.
Returns
-------
x : dict
Dictionary with the at/gc/n counts and proporti... | flowcraft/templates/process_viral_assembly.py | def _get_gc_content(sequence, length):
"""Get GC content and proportions.
Parameters
----------
sequence : str
The complete sequence of the contig.
length : int
The length of the sequence contig.
Returns
-------
x : dict
... | def _get_gc_content(sequence, length):
"""Get GC content and proportions.
Parameters
----------
sequence : str
The complete sequence of the contig.
length : int
The length of the sequence contig.
Returns
-------
x : dict
... | [
"Get",
"GC",
"content",
"and",
"proportions",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/process_viral_assembly.py#L281-L309 | [
"def",
"_get_gc_content",
"(",
"sequence",
",",
"length",
")",
":",
"# Get AT/GC/N counts",
"at",
"=",
"sum",
"(",
"map",
"(",
"sequence",
".",
"count",
",",
"[",
"\"A\"",
",",
"\"T\"",
"]",
")",
")",
"gc",
"=",
"sum",
"(",
"map",
"(",
"sequence",
".... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Assembly.filter_contigs | Filters the contigs of the assembly according to user provided\
comparisons.
The comparisons must be a list of three elements with the
:py:attr:`~Assembly.contigs` key, operator and test value. For
example, to filter contigs with a minimum length of 250, a comparison
would be::
... | flowcraft/templates/process_viral_assembly.py | def filter_contigs(self, *comparisons):
"""Filters the contigs of the assembly according to user provided\
comparisons.
The comparisons must be a list of three elements with the
:py:attr:`~Assembly.contigs` key, operator and test value. For
example, to filter contigs with a mini... | def filter_contigs(self, *comparisons):
"""Filters the contigs of the assembly according to user provided\
comparisons.
The comparisons must be a list of three elements with the
:py:attr:`~Assembly.contigs` key, operator and test value. For
example, to filter contigs with a mini... | [
"Filters",
"the",
"contigs",
"of",
"the",
"assembly",
"according",
"to",
"user",
"provided",
"\\",
"comparisons",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/process_viral_assembly.py#L344-L391 | [
"def",
"filter_contigs",
"(",
"self",
",",
"*",
"comparisons",
")",
":",
"# Reset list of filtered ids",
"self",
".",
"filtered_ids",
"=",
"[",
"]",
"self",
".",
"report",
"=",
"{",
"}",
"gc_filters",
"=",
"[",
"[",
"\"gc_prop\"",
",",
"\">=\"",
",",
"self... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Assembly.get_assembly_length | Returns the length of the assembly, without the filtered contigs.
Returns
-------
x : int
Total length of the assembly. | flowcraft/templates/process_viral_assembly.py | def get_assembly_length(self):
"""Returns the length of the assembly, without the filtered contigs.
Returns
-------
x : int
Total length of the assembly.
"""
return sum(
[vals["length"] for contig_id, vals in self.contigs.items()
if... | def get_assembly_length(self):
"""Returns the length of the assembly, without the filtered contigs.
Returns
-------
x : int
Total length of the assembly.
"""
return sum(
[vals["length"] for contig_id, vals in self.contigs.items()
if... | [
"Returns",
"the",
"length",
"of",
"the",
"assembly",
"without",
"the",
"filtered",
"contigs",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/process_viral_assembly.py#L393-L405 | [
"def",
"get_assembly_length",
"(",
"self",
")",
":",
"return",
"sum",
"(",
"[",
"vals",
"[",
"\"length\"",
"]",
"for",
"contig_id",
",",
"vals",
"in",
"self",
".",
"contigs",
".",
"items",
"(",
")",
"if",
"contig_id",
"not",
"in",
"self",
".",
"filtere... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Assembly.write_assembly | Writes the assembly to a new file.
The ``filtered`` option controls whether the new assembly will be
filtered or not.
Parameters
----------
output_file : str
Name of the output assembly file.
filtered : bool
If ``True``, does not include filtered... | flowcraft/templates/process_viral_assembly.py | def write_assembly(self, output_file, filtered=True):
"""Writes the assembly to a new file.
The ``filtered`` option controls whether the new assembly will be
filtered or not.
Parameters
----------
output_file : str
Name of the output assembly file.
f... | def write_assembly(self, output_file, filtered=True):
"""Writes the assembly to a new file.
The ``filtered`` option controls whether the new assembly will be
filtered or not.
Parameters
----------
output_file : str
Name of the output assembly file.
f... | [
"Writes",
"the",
"assembly",
"to",
"a",
"new",
"file",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/process_viral_assembly.py#L407-L429 | [
"def",
"write_assembly",
"(",
"self",
",",
"output_file",
",",
"filtered",
"=",
"True",
")",
":",
"logger",
".",
"debug",
"(",
"\"Writing the filtered assembly into: {}\"",
".",
"format",
"(",
"output_file",
")",
")",
"with",
"open",
"(",
"output_file",
",",
"... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Assembly.write_report | Writes a report with the test results for the current assembly
Parameters
----------
output_file : str
Name of the output assembly file. | flowcraft/templates/process_viral_assembly.py | def write_report(self, output_file):
"""Writes a report with the test results for the current assembly
Parameters
----------
output_file : str
Name of the output assembly file.
"""
logger.debug("Writing the assembly report into: {}".format(
outp... | def write_report(self, output_file):
"""Writes a report with the test results for the current assembly
Parameters
----------
output_file : str
Name of the output assembly file.
"""
logger.debug("Writing the assembly report into: {}".format(
outp... | [
"Writes",
"a",
"report",
"with",
"the",
"test",
"results",
"for",
"the",
"current",
"assembly"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/process_viral_assembly.py#L431-L446 | [
"def",
"write_report",
"(",
"self",
",",
"output_file",
")",
":",
"logger",
".",
"debug",
"(",
"\"Writing the assembly report into: {}\"",
".",
"format",
"(",
"output_file",
")",
")",
"with",
"open",
"(",
"output_file",
",",
"\"w\"",
")",
"as",
"fh",
":",
"f... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | guess_process | Function to guess processes based on strings that are not available in
process_map. If the string has typos and is somewhat similar (50%) to any
process available in flowcraft it will print info to the terminal,
suggesting the most similar processes available in flowcraft.
Parameters
----------
... | flowcraft/generator/pipeline_parser.py | def guess_process(query_str, process_map):
"""
Function to guess processes based on strings that are not available in
process_map. If the string has typos and is somewhat similar (50%) to any
process available in flowcraft it will print info to the terminal,
suggesting the most similar processes ava... | def guess_process(query_str, process_map):
"""
Function to guess processes based on strings that are not available in
process_map. If the string has typos and is somewhat similar (50%) to any
process available in flowcraft it will print info to the terminal,
suggesting the most similar processes ava... | [
"Function",
"to",
"guess",
"processes",
"based",
"on",
"strings",
"that",
"are",
"not",
"available",
"in",
"process_map",
".",
"If",
"the",
"string",
"has",
"typos",
"and",
"is",
"somewhat",
"similar",
"(",
"50%",
")",
"to",
"any",
"process",
"available",
... | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/pipeline_parser.py#L24-L55 | [
"def",
"guess_process",
"(",
"query_str",
",",
"process_map",
")",
":",
"save_list",
"=",
"[",
"]",
"# loops between the processes available in process_map",
"for",
"process",
"in",
"process_map",
":",
"similarity",
"=",
"SequenceMatcher",
"(",
"None",
",",
"process",... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | remove_inner_forks | Recursively removes nested brackets
This function is used to remove nested brackets from fork strings using
regular expressions
Parameters
----------
text: str
The string that contains brackets with inner forks to be removed
Returns
-------
text: str
the string with on... | flowcraft/generator/pipeline_parser.py | def remove_inner_forks(text):
"""Recursively removes nested brackets
This function is used to remove nested brackets from fork strings using
regular expressions
Parameters
----------
text: str
The string that contains brackets with inner forks to be removed
Returns
-------
... | def remove_inner_forks(text):
"""Recursively removes nested brackets
This function is used to remove nested brackets from fork strings using
regular expressions
Parameters
----------
text: str
The string that contains brackets with inner forks to be removed
Returns
-------
... | [
"Recursively",
"removes",
"nested",
"brackets"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/pipeline_parser.py#L58-L84 | [
"def",
"remove_inner_forks",
"(",
"text",
")",
":",
"n",
"=",
"1",
"# run at least once for one level of fork",
"# Then this loop assures that all brackets will get removed in a nested",
"# structure",
"while",
"n",
":",
"# this removes non-nested brackets",
"text",
",",
"n",
"... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | brackets_insanity_check | This function performs a check for different number of '(' and ')'
characters, which indicates that some forks are poorly constructed.
Parameters
----------
p_string: str
String with the definition of the pipeline, e.g.::
'processA processB processC(ProcessD | ProcessE)' | flowcraft/generator/pipeline_parser.py | def brackets_insanity_check(p_string):
"""
This function performs a check for different number of '(' and ')'
characters, which indicates that some forks are poorly constructed.
Parameters
----------
p_string: str
String with the definition of the pipeline, e.g.::
'process... | def brackets_insanity_check(p_string):
"""
This function performs a check for different number of '(' and ')'
characters, which indicates that some forks are poorly constructed.
Parameters
----------
p_string: str
String with the definition of the pipeline, e.g.::
'process... | [
"This",
"function",
"performs",
"a",
"check",
"for",
"different",
"number",
"of",
"(",
"and",
")",
"characters",
"which",
"indicates",
"that",
"some",
"forks",
"are",
"poorly",
"constructed",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/pipeline_parser.py#L120-L147 | [
"def",
"brackets_insanity_check",
"(",
"p_string",
")",
":",
"if",
"p_string",
".",
"count",
"(",
"FORK_TOKEN",
")",
"!=",
"p_string",
".",
"count",
"(",
"CLOSE_TOKEN",
")",
":",
"# get the number of each type of bracket and state the one that has a",
"# higher value",
... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | fork_procs_insanity_check | This function checks if the pipeline string contains a process between
the fork start token or end token and the separator (lane) token. Checks for
the absence of processes in one of the branches of the fork ['|)' and '(|']
and for the existence of a process before starting a fork (in an inner fork)
['|... | flowcraft/generator/pipeline_parser.py | def fork_procs_insanity_check(p_string):
"""
This function checks if the pipeline string contains a process between
the fork start token or end token and the separator (lane) token. Checks for
the absence of processes in one of the branches of the fork ['|)' and '(|']
and for the existence of a proc... | def fork_procs_insanity_check(p_string):
"""
This function checks if the pipeline string contains a process between
the fork start token or end token and the separator (lane) token. Checks for
the absence of processes in one of the branches of the fork ['|)' and '(|']
and for the existence of a proc... | [
"This",
"function",
"checks",
"if",
"the",
"pipeline",
"string",
"contains",
"a",
"process",
"between",
"the",
"fork",
"start",
"token",
"or",
"end",
"token",
"and",
"the",
"separator",
"(",
"lane",
")",
"token",
".",
"Checks",
"for",
"the",
"absence",
"of... | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/pipeline_parser.py#L186-L210 | [
"def",
"fork_procs_insanity_check",
"(",
"p_string",
")",
":",
"# Check for the absence of processes in one of the branches of the fork",
"# ['|)' and '(|'] and for the existence of a process before starting a fork",
"# (in an inner fork) ['|('].",
"if",
"FORK_TOKEN",
"+",
"LANE_TOKEN",
"i... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | inner_fork_insanity_checks | This function performs two sanity checks in the pipeline string. The first
check, assures that each fork contains a lane token '|', while the second
check looks for duplicated processes within the same fork.
Parameters
----------
pipeline_string: str
String with the definition of the pipel... | flowcraft/generator/pipeline_parser.py | def inner_fork_insanity_checks(pipeline_string):
"""
This function performs two sanity checks in the pipeline string. The first
check, assures that each fork contains a lane token '|', while the second
check looks for duplicated processes within the same fork.
Parameters
----------
pipeline... | def inner_fork_insanity_checks(pipeline_string):
"""
This function performs two sanity checks in the pipeline string. The first
check, assures that each fork contains a lane token '|', while the second
check looks for duplicated processes within the same fork.
Parameters
----------
pipeline... | [
"This",
"function",
"performs",
"two",
"sanity",
"checks",
"in",
"the",
"pipeline",
"string",
".",
"The",
"first",
"check",
"assures",
"that",
"each",
"fork",
"contains",
"a",
"lane",
"token",
"|",
"while",
"the",
"second",
"check",
"looks",
"for",
"duplicat... | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/pipeline_parser.py#L250-L302 | [
"def",
"inner_fork_insanity_checks",
"(",
"pipeline_string",
")",
":",
"# first lets get all forks to a list.",
"list_of_forks",
"=",
"[",
"]",
"# stores forks",
"left_indexes",
"=",
"[",
"]",
"# stores indexes of left brackets",
"# iterate through the string looking for '(' and ')... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | insanity_checks | Wrapper that performs all sanity checks on the pipeline string
Parameters
----------
pipeline_str : str
String with the pipeline definition | flowcraft/generator/pipeline_parser.py | def insanity_checks(pipeline_str):
"""Wrapper that performs all sanity checks on the pipeline string
Parameters
----------
pipeline_str : str
String with the pipeline definition
"""
# Gets rid of all spaces in string
p_string = pipeline_str.replace(" ", "").strip()
# some of t... | def insanity_checks(pipeline_str):
"""Wrapper that performs all sanity checks on the pipeline string
Parameters
----------
pipeline_str : str
String with the pipeline definition
"""
# Gets rid of all spaces in string
p_string = pipeline_str.replace(" ", "").strip()
# some of t... | [
"Wrapper",
"that",
"performs",
"all",
"sanity",
"checks",
"on",
"the",
"pipeline",
"string"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/pipeline_parser.py#L305-L338 | [
"def",
"insanity_checks",
"(",
"pipeline_str",
")",
":",
"# Gets rid of all spaces in string",
"p_string",
"=",
"pipeline_str",
".",
"replace",
"(",
"\" \"",
",",
"\"\"",
")",
".",
"strip",
"(",
")",
"# some of the check functions use the pipeline_str as the user provided b... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | parse_pipeline | Parses a pipeline string into a list of dictionaries with the connections
between processes
Parameters
----------
pipeline_str : str
String with the definition of the pipeline, e.g.::
'processA processB processC(ProcessD | ProcessE)'
Returns
-------
pipeline_links : li... | flowcraft/generator/pipeline_parser.py | def parse_pipeline(pipeline_str):
"""Parses a pipeline string into a list of dictionaries with the connections
between processes
Parameters
----------
pipeline_str : str
String with the definition of the pipeline, e.g.::
'processA processB processC(ProcessD | ProcessE)'
Re... | def parse_pipeline(pipeline_str):
"""Parses a pipeline string into a list of dictionaries with the connections
between processes
Parameters
----------
pipeline_str : str
String with the definition of the pipeline, e.g.::
'processA processB processC(ProcessD | ProcessE)'
Re... | [
"Parses",
"a",
"pipeline",
"string",
"into",
"a",
"list",
"of",
"dictionaries",
"with",
"the",
"connections",
"between",
"processes"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/pipeline_parser.py#L341-L447 | [
"def",
"parse_pipeline",
"(",
"pipeline_str",
")",
":",
"if",
"os",
".",
"path",
".",
"exists",
"(",
"pipeline_str",
")",
":",
"logger",
".",
"debug",
"(",
"\"Found pipeline file: {}\"",
".",
"format",
"(",
"pipeline_str",
")",
")",
"with",
"open",
"(",
"p... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | get_source_lane | Returns the lane of the last process that matches fork_process
Parameters
----------
fork_process : list
List of processes before the fork.
pipeline_list : list
List with the pipeline connection dictionaries.
Returns
-------
int
Lane of the last process that matches... | flowcraft/generator/pipeline_parser.py | def get_source_lane(fork_process, pipeline_list):
"""Returns the lane of the last process that matches fork_process
Parameters
----------
fork_process : list
List of processes before the fork.
pipeline_list : list
List with the pipeline connection dictionaries.
Returns
----... | def get_source_lane(fork_process, pipeline_list):
"""Returns the lane of the last process that matches fork_process
Parameters
----------
fork_process : list
List of processes before the fork.
pipeline_list : list
List with the pipeline connection dictionaries.
Returns
----... | [
"Returns",
"the",
"lane",
"of",
"the",
"last",
"process",
"that",
"matches",
"fork_process"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/pipeline_parser.py#L450-L483 | [
"def",
"get_source_lane",
"(",
"fork_process",
",",
"pipeline_list",
")",
":",
"fork_source",
"=",
"fork_process",
"[",
"-",
"1",
"]",
"fork_sig",
"=",
"[",
"x",
"for",
"x",
"in",
"fork_process",
"if",
"x",
"!=",
"\"__init__\"",
"]",
"for",
"position",
","... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | get_lanes | From a raw pipeline string, get a list of lanes from the start
of the current fork.
When the pipeline is being parsed, it will be split at every fork
position. The string at the right of the fork position will be provided
to this function. It's job is to retrieve the lanes that result
from that for... | flowcraft/generator/pipeline_parser.py | def get_lanes(lanes_str):
"""From a raw pipeline string, get a list of lanes from the start
of the current fork.
When the pipeline is being parsed, it will be split at every fork
position. The string at the right of the fork position will be provided
to this function. It's job is to retrieve the la... | def get_lanes(lanes_str):
"""From a raw pipeline string, get a list of lanes from the start
of the current fork.
When the pipeline is being parsed, it will be split at every fork
position. The string at the right of the fork position will be provided
to this function. It's job is to retrieve the la... | [
"From",
"a",
"raw",
"pipeline",
"string",
"get",
"a",
"list",
"of",
"lanes",
"from",
"the",
"start",
"of",
"the",
"current",
"fork",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/pipeline_parser.py#L486-L532 | [
"def",
"get_lanes",
"(",
"lanes_str",
")",
":",
"logger",
".",
"debug",
"(",
"\"Parsing lanes from raw string: {}\"",
".",
"format",
"(",
"lanes_str",
")",
")",
"# Temporarily stores the lanes string after removal of nested forks",
"parsed_lanes",
"=",
"\"\"",
"# Flag used ... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | linear_connection | Connects a linear list of processes into a list of dictionaries
Parameters
----------
plist : list
List with process names. This list should contain at least two entries.
lane : int
Corresponding lane of the processes
Returns
-------
res : list
List of dictionaries ... | flowcraft/generator/pipeline_parser.py | def linear_connection(plist, lane):
"""Connects a linear list of processes into a list of dictionaries
Parameters
----------
plist : list
List with process names. This list should contain at least two entries.
lane : int
Corresponding lane of the processes
Returns
-------
... | def linear_connection(plist, lane):
"""Connects a linear list of processes into a list of dictionaries
Parameters
----------
plist : list
List with process names. This list should contain at least two entries.
lane : int
Corresponding lane of the processes
Returns
-------
... | [
"Connects",
"a",
"linear",
"list",
"of",
"processes",
"into",
"a",
"list",
"of",
"dictionaries"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/pipeline_parser.py#L535-L575 | [
"def",
"linear_connection",
"(",
"plist",
",",
"lane",
")",
":",
"logger",
".",
"debug",
"(",
"\"Establishing linear connection with processes: {}\"",
".",
"format",
"(",
"plist",
")",
")",
"res",
"=",
"[",
"]",
"previous",
"=",
"None",
"for",
"p",
"in",
"pl... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | fork_connection | Makes the connection between a process and the first processes in the
lanes to which it forks.
The ``lane`` argument should correspond to the lane of the source process.
For each lane in ``sink``, the lane counter will increase.
Parameters
----------
source : str
Name of the process th... | flowcraft/generator/pipeline_parser.py | def fork_connection(source, sink, source_lane, lane):
"""Makes the connection between a process and the first processes in the
lanes to which it forks.
The ``lane`` argument should correspond to the lane of the source process.
For each lane in ``sink``, the lane counter will increase.
Parameters
... | def fork_connection(source, sink, source_lane, lane):
"""Makes the connection between a process and the first processes in the
lanes to which it forks.
The ``lane`` argument should correspond to the lane of the source process.
For each lane in ``sink``, the lane counter will increase.
Parameters
... | [
"Makes",
"the",
"connection",
"between",
"a",
"process",
"and",
"the",
"first",
"processes",
"in",
"the",
"lanes",
"to",
"which",
"it",
"forks",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/pipeline_parser.py#L578-L624 | [
"def",
"fork_connection",
"(",
"source",
",",
"sink",
",",
"source_lane",
",",
"lane",
")",
":",
"logger",
".",
"debug",
"(",
"\"Establishing forking of source '{}' into processes\"",
"\" '{}'. Source lane set to '{}' and lane set to '{}'\"",
".",
"format",
"(",
"source",
... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | add_unique_identifiers | Returns the pipeline string with unique identifiers and a dictionary with
references between the unique keys and the original values
Parameters
----------
pipeline_str : str
Pipeline string
Returns
-------
str
Pipeline string with unique identifiers
dict
Match ... | flowcraft/generator/pipeline_parser.py | def add_unique_identifiers(pipeline_str):
"""Returns the pipeline string with unique identifiers and a dictionary with
references between the unique keys and the original values
Parameters
----------
pipeline_str : str
Pipeline string
Returns
-------
str
Pipeline strin... | def add_unique_identifiers(pipeline_str):
"""Returns the pipeline string with unique identifiers and a dictionary with
references between the unique keys and the original values
Parameters
----------
pipeline_str : str
Pipeline string
Returns
-------
str
Pipeline strin... | [
"Returns",
"the",
"pipeline",
"string",
"with",
"unique",
"identifiers",
"and",
"a",
"dictionary",
"with",
"references",
"between",
"the",
"unique",
"keys",
"and",
"the",
"original",
"values"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/pipeline_parser.py#L657-L727 | [
"def",
"add_unique_identifiers",
"(",
"pipeline_str",
")",
":",
"# Add space at beginning and end of pipeline to allow regex mapping of final",
"# process in linear pipelines",
"pipeline_str_modified",
"=",
"\" {} \"",
".",
"format",
"(",
"pipeline_str",
")",
"# Regex to get all proc... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | remove_unique_identifiers | Removes unique identifiers and add the original process names to the
already parsed pipelines
Parameters
----------
identifiers_to_tags : dict
Match between unique process identifiers and process names
pipeline_links: list
Parsed pipeline list with unique identifiers
Returns
... | flowcraft/generator/pipeline_parser.py | def remove_unique_identifiers(identifiers_to_tags, pipeline_links):
"""Removes unique identifiers and add the original process names to the
already parsed pipelines
Parameters
----------
identifiers_to_tags : dict
Match between unique process identifiers and process names
pipeline_links... | def remove_unique_identifiers(identifiers_to_tags, pipeline_links):
"""Removes unique identifiers and add the original process names to the
already parsed pipelines
Parameters
----------
identifiers_to_tags : dict
Match between unique process identifiers and process names
pipeline_links... | [
"Removes",
"unique",
"identifiers",
"and",
"add",
"the",
"original",
"process",
"names",
"to",
"the",
"already",
"parsed",
"pipelines"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/pipeline_parser.py#L730-L756 | [
"def",
"remove_unique_identifiers",
"(",
"identifiers_to_tags",
",",
"pipeline_links",
")",
":",
"# Replaces the unique identifiers by the original process names",
"for",
"index",
",",
"val",
"in",
"enumerate",
"(",
"pipeline_links",
")",
":",
"if",
"val",
"[",
"\"input\"... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | signal_handler | This function is bound to the SIGINT signal (like ctrl+c) to graciously
exit the program and reset the curses options. | flowcraft/generator/inspect.py | def signal_handler(screen):
"""This function is bound to the SIGINT signal (like ctrl+c) to graciously
exit the program and reset the curses options.
"""
if screen:
screen.clear()
screen.refresh()
curses.nocbreak()
screen.keypad(0)
curses.echo()
curses.e... | def signal_handler(screen):
"""This function is bound to the SIGINT signal (like ctrl+c) to graciously
exit the program and reset the curses options.
"""
if screen:
screen.clear()
screen.refresh()
curses.nocbreak()
screen.keypad(0)
curses.echo()
curses.e... | [
"This",
"function",
"is",
"bound",
"to",
"the",
"SIGINT",
"signal",
"(",
"like",
"ctrl",
"+",
"c",
")",
"to",
"graciously",
"exit",
"the",
"program",
"and",
"reset",
"the",
"curses",
"options",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L35-L50 | [
"def",
"signal_handler",
"(",
"screen",
")",
":",
"if",
"screen",
":",
"screen",
".",
"clear",
"(",
")",
"screen",
".",
"refresh",
"(",
")",
"curses",
".",
"nocbreak",
"(",
")",
"screen",
".",
"keypad",
"(",
"0",
")",
"curses",
".",
"echo",
"(",
")... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector._check_required_files | Checks whetner the trace and log files are available | flowcraft/generator/inspect.py | def _check_required_files(self):
"""Checks whetner the trace and log files are available
"""
if not os.path.exists(self.trace_file):
raise eh.InspectionError("The provided trace file could not be "
"opened: {}".format(self.trace_file))
i... | def _check_required_files(self):
"""Checks whetner the trace and log files are available
"""
if not os.path.exists(self.trace_file):
raise eh.InspectionError("The provided trace file could not be "
"opened: {}".format(self.trace_file))
i... | [
"Checks",
"whetner",
"the",
"trace",
"and",
"log",
"files",
"are",
"available"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L267-L278 | [
"def",
"_check_required_files",
"(",
"self",
")",
":",
"if",
"not",
"os",
".",
"path",
".",
"exists",
"(",
"self",
".",
"trace_file",
")",
":",
"raise",
"eh",
".",
"InspectionError",
"(",
"\"The provided trace file could not be \"",
"\"opened: {}\"",
".",
"forma... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector._header_mapping | Parses the trace file header and retrieves the positions of each
column key.
Parameters
----------
header : str
The header line of nextflow's trace file
Returns
-------
dict
Mapping the column ID to its position (e.g.: {"tag":2}) | flowcraft/generator/inspect.py | def _header_mapping(header):
"""Parses the trace file header and retrieves the positions of each
column key.
Parameters
----------
header : str
The header line of nextflow's trace file
Returns
-------
dict
Mapping the column ID to... | def _header_mapping(header):
"""Parses the trace file header and retrieves the positions of each
column key.
Parameters
----------
header : str
The header line of nextflow's trace file
Returns
-------
dict
Mapping the column ID to... | [
"Parses",
"the",
"trace",
"file",
"header",
"and",
"retrieves",
"the",
"positions",
"of",
"each",
"column",
"key",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L281-L298 | [
"def",
"_header_mapping",
"(",
"header",
")",
":",
"return",
"dict",
"(",
"(",
"x",
".",
"strip",
"(",
")",
",",
"pos",
")",
"for",
"pos",
",",
"x",
"in",
"enumerate",
"(",
"header",
".",
"split",
"(",
"\"\\t\"",
")",
")",
")"
] | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector._expand_path | Expands the hash string of a process (ae/1dasjdm) into a full
working directory
Parameters
----------
hash_str : str
Nextflow process hash with the beggining of the work directory
Returns
-------
str
Path to working directory of the hash ... | flowcraft/generator/inspect.py | def _expand_path(hash_str):
"""Expands the hash string of a process (ae/1dasjdm) into a full
working directory
Parameters
----------
hash_str : str
Nextflow process hash with the beggining of the work directory
Returns
-------
str
... | def _expand_path(hash_str):
"""Expands the hash string of a process (ae/1dasjdm) into a full
working directory
Parameters
----------
hash_str : str
Nextflow process hash with the beggining of the work directory
Returns
-------
str
... | [
"Expands",
"the",
"hash",
"string",
"of",
"a",
"process",
"(",
"ae",
"/",
"1dasjdm",
")",
"into",
"a",
"full",
"working",
"directory"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L301-L324 | [
"def",
"_expand_path",
"(",
"hash_str",
")",
":",
"try",
":",
"first_hash",
",",
"second_hash",
"=",
"hash_str",
".",
"split",
"(",
"\"/\"",
")",
"first_hash_path",
"=",
"join",
"(",
"abspath",
"(",
"\"work\"",
")",
",",
"first_hash",
")",
"for",
"l",
"i... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector._hms | Converts a hms string into seconds.
Parameters
----------
s : str
The hms string can be something like '20s', '1m30s' or '300ms'.
Returns
-------
float
Time in seconds. | flowcraft/generator/inspect.py | def _hms(s):
"""Converts a hms string into seconds.
Parameters
----------
s : str
The hms string can be something like '20s', '1m30s' or '300ms'.
Returns
-------
float
Time in seconds.
"""
if s == "-":
return... | def _hms(s):
"""Converts a hms string into seconds.
Parameters
----------
s : str
The hms string can be something like '20s', '1m30s' or '300ms'.
Returns
-------
float
Time in seconds.
"""
if s == "-":
return... | [
"Converts",
"a",
"hms",
"string",
"into",
"seconds",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L327-L357 | [
"def",
"_hms",
"(",
"s",
")",
":",
"if",
"s",
"==",
"\"-\"",
":",
"return",
"0",
"if",
"s",
".",
"endswith",
"(",
"\"ms\"",
")",
":",
"return",
"float",
"(",
"s",
".",
"rstrip",
"(",
"\"ms\"",
")",
")",
"/",
"1000",
"fields",
"=",
"list",
"(",
... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector._size_coverter | Converts size string into megabytes
Parameters
----------
s : str
The size string can be '30KB', '20MB' or '1GB'
Returns
-------
float
With the size in bytes | flowcraft/generator/inspect.py | def _size_coverter(s):
"""Converts size string into megabytes
Parameters
----------
s : str
The size string can be '30KB', '20MB' or '1GB'
Returns
-------
float
With the size in bytes
"""
if s.upper().endswith("KB"):
... | def _size_coverter(s):
"""Converts size string into megabytes
Parameters
----------
s : str
The size string can be '30KB', '20MB' or '1GB'
Returns
-------
float
With the size in bytes
"""
if s.upper().endswith("KB"):
... | [
"Converts",
"size",
"string",
"into",
"megabytes"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L360-L391 | [
"def",
"_size_coverter",
"(",
"s",
")",
":",
"if",
"s",
".",
"upper",
"(",
")",
".",
"endswith",
"(",
"\"KB\"",
")",
":",
"return",
"float",
"(",
"s",
".",
"rstrip",
"(",
"\"KB\"",
")",
")",
"/",
"1024",
"elif",
"s",
".",
"upper",
"(",
")",
"."... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector._get_pipeline_processes | Parses the .nextflow.log file and retrieves the complete list
of processes
This method searches for specific signatures at the beginning of the
.nextflow.log file::
Apr-19 19:07:32.660 [main] DEBUG nextflow.processor
TaskProcessor - Creating operator > report_corrupt_... | flowcraft/generator/inspect.py | def _get_pipeline_processes(self):
"""Parses the .nextflow.log file and retrieves the complete list
of processes
This method searches for specific signatures at the beginning of the
.nextflow.log file::
Apr-19 19:07:32.660 [main] DEBUG nextflow.processor
TaskP... | def _get_pipeline_processes(self):
"""Parses the .nextflow.log file and retrieves the complete list
of processes
This method searches for specific signatures at the beginning of the
.nextflow.log file::
Apr-19 19:07:32.660 [main] DEBUG nextflow.processor
TaskP... | [
"Parses",
"the",
".",
"nextflow",
".",
"log",
"file",
"and",
"retrieves",
"the",
"complete",
"list",
"of",
"processes"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L407-L454 | [
"def",
"_get_pipeline_processes",
"(",
"self",
")",
":",
"with",
"open",
"(",
"self",
".",
"log_file",
")",
"as",
"fh",
":",
"for",
"line",
"in",
"fh",
":",
"if",
"re",
".",
"match",
"(",
"\".*Creating operator.*\"",
",",
"line",
")",
":",
"# Retrieves t... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector._clear_inspect | Clears inspect attributes when re-executing a pipeline | flowcraft/generator/inspect.py | def _clear_inspect(self):
"""Clears inspect attributes when re-executing a pipeline"""
self.trace_info = defaultdict(list)
self.process_tags = {}
self.process_stats = {}
self.samples = []
self.stored_ids = []
self.stored_log_ids = []
self.time_start = Non... | def _clear_inspect(self):
"""Clears inspect attributes when re-executing a pipeline"""
self.trace_info = defaultdict(list)
self.process_tags = {}
self.process_stats = {}
self.samples = []
self.stored_ids = []
self.stored_log_ids = []
self.time_start = Non... | [
"Clears",
"inspect",
"attributes",
"when",
"re",
"-",
"executing",
"a",
"pipeline"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L456-L475 | [
"def",
"_clear_inspect",
"(",
"self",
")",
":",
"self",
".",
"trace_info",
"=",
"defaultdict",
"(",
"list",
")",
"self",
".",
"process_tags",
"=",
"{",
"}",
"self",
".",
"process_stats",
"=",
"{",
"}",
"self",
".",
"samples",
"=",
"[",
"]",
"self",
"... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector._update_pipeline_status | Parses the .nextflow.log file for signatures of pipeline status.
It sets the :attr:`status_info` attribute. | flowcraft/generator/inspect.py | def _update_pipeline_status(self):
"""Parses the .nextflow.log file for signatures of pipeline status.
It sets the :attr:`status_info` attribute.
"""
with open(self.log_file) as fh:
try:
first_line = next(fh)
except:
raise eh.Insp... | def _update_pipeline_status(self):
"""Parses the .nextflow.log file for signatures of pipeline status.
It sets the :attr:`status_info` attribute.
"""
with open(self.log_file) as fh:
try:
first_line = next(fh)
except:
raise eh.Insp... | [
"Parses",
"the",
".",
"nextflow",
".",
"log",
"file",
"for",
"signatures",
"of",
"pipeline",
"status",
".",
"It",
"sets",
"the",
":",
"attr",
":",
"status_info",
"attribute",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L477-L537 | [
"def",
"_update_pipeline_status",
"(",
"self",
")",
":",
"with",
"open",
"(",
"self",
".",
"log_file",
")",
"as",
"fh",
":",
"try",
":",
"first_line",
"=",
"next",
"(",
"fh",
")",
"except",
":",
"raise",
"eh",
".",
"InspectionError",
"(",
"\"Could not re... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector._update_tag_status | Updates the 'submitted', 'finished', 'failed' and 'retry' status
of each process/tag combination.
Process/tag combinations provided to this method already appear on
the trace file, so their submission status is updated based on their
execution status from nextflow.
For instance... | flowcraft/generator/inspect.py | def _update_tag_status(self, process, vals):
""" Updates the 'submitted', 'finished', 'failed' and 'retry' status
of each process/tag combination.
Process/tag combinations provided to this method already appear on
the trace file, so their submission status is updated based on their
... | def _update_tag_status(self, process, vals):
""" Updates the 'submitted', 'finished', 'failed' and 'retry' status
of each process/tag combination.
Process/tag combinations provided to this method already appear on
the trace file, so their submission status is updated based on their
... | [
"Updates",
"the",
"submitted",
"finished",
"failed",
"and",
"retry",
"status",
"of",
"each",
"process",
"/",
"tag",
"combination",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L539-L599 | [
"def",
"_update_tag_status",
"(",
"self",
",",
"process",
",",
"vals",
")",
":",
"good_status",
"=",
"[",
"\"COMPLETED\"",
",",
"\"CACHED\"",
"]",
"# Update status of each process",
"for",
"v",
"in",
"list",
"(",
"vals",
")",
"[",
":",
":",
"-",
"1",
"]",
... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector._update_barrier_status | Checks whether the channels to each process have been closed. | flowcraft/generator/inspect.py | def _update_barrier_status(self):
"""Checks whether the channels to each process have been closed.
"""
with open(self.log_file) as fh:
for line in fh:
# Exit barrier update after session abort signal
if "Session aborted" in line:
... | def _update_barrier_status(self):
"""Checks whether the channels to each process have been closed.
"""
with open(self.log_file) as fh:
for line in fh:
# Exit barrier update after session abort signal
if "Session aborted" in line:
... | [
"Checks",
"whether",
"the",
"channels",
"to",
"each",
"process",
"have",
"been",
"closed",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L601-L620 | [
"def",
"_update_barrier_status",
"(",
"self",
")",
":",
"with",
"open",
"(",
"self",
".",
"log_file",
")",
"as",
"fh",
":",
"for",
"line",
"in",
"fh",
":",
"# Exit barrier update after session abort signal",
"if",
"\"Session aborted\"",
"in",
"line",
":",
"retur... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector._retrieve_log | Method used to retrieve the contents of a log file into a list.
Parameters
----------
path
Returns
-------
list or None
Contents of the provided file, each line as a list entry | flowcraft/generator/inspect.py | def _retrieve_log(path):
"""Method used to retrieve the contents of a log file into a list.
Parameters
----------
path
Returns
-------
list or None
Contents of the provided file, each line as a list entry
"""
if not os.path.exists(pa... | def _retrieve_log(path):
"""Method used to retrieve the contents of a log file into a list.
Parameters
----------
path
Returns
-------
list or None
Contents of the provided file, each line as a list entry
"""
if not os.path.exists(pa... | [
"Method",
"used",
"to",
"retrieve",
"the",
"contents",
"of",
"a",
"log",
"file",
"into",
"a",
"list",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L623-L640 | [
"def",
"_retrieve_log",
"(",
"path",
")",
":",
"if",
"not",
"os",
".",
"path",
".",
"exists",
"(",
"path",
")",
":",
"return",
"None",
"with",
"open",
"(",
"path",
")",
"as",
"fh",
":",
"return",
"fh",
".",
"readlines",
"(",
")"
] | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector._update_trace_info | Parses a trace line and updates the :attr:`status_info` attribute.
Parameters
----------
fields : list
List of the tab-seperated elements of the trace line
hm : dict
Maps the column IDs to their position in the fields argument.
This dictionary object ... | flowcraft/generator/inspect.py | def _update_trace_info(self, fields, hm):
"""Parses a trace line and updates the :attr:`status_info` attribute.
Parameters
----------
fields : list
List of the tab-seperated elements of the trace line
hm : dict
Maps the column IDs to their position in the... | def _update_trace_info(self, fields, hm):
"""Parses a trace line and updates the :attr:`status_info` attribute.
Parameters
----------
fields : list
List of the tab-seperated elements of the trace line
hm : dict
Maps the column IDs to their position in the... | [
"Parses",
"a",
"trace",
"line",
"and",
"updates",
"the",
":",
"attr",
":",
"status_info",
"attribute",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L642-L713 | [
"def",
"_update_trace_info",
"(",
"self",
",",
"fields",
",",
"hm",
")",
":",
"process",
"=",
"fields",
"[",
"hm",
"[",
"\"process\"",
"]",
"]",
"if",
"process",
"not",
"in",
"self",
".",
"processes",
":",
"return",
"# Get information from a single line of tra... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector._update_process_resources | Updates the resources info in :attr:`processes` dictionary. | flowcraft/generator/inspect.py | def _update_process_resources(self, process, vals):
"""Updates the resources info in :attr:`processes` dictionary.
"""
resources = ["cpus"]
for r in resources:
if not self.processes[process][r]:
try:
self.processes[process][r] = vals[0]["... | def _update_process_resources(self, process, vals):
"""Updates the resources info in :attr:`processes` dictionary.
"""
resources = ["cpus"]
for r in resources:
if not self.processes[process][r]:
try:
self.processes[process][r] = vals[0]["... | [
"Updates",
"the",
"resources",
"info",
"in",
":",
"attr",
":",
"processes",
"dictionary",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L715-L727 | [
"def",
"_update_process_resources",
"(",
"self",
",",
"process",
",",
"vals",
")",
":",
"resources",
"=",
"[",
"\"cpus\"",
"]",
"for",
"r",
"in",
"resources",
":",
"if",
"not",
"self",
".",
"processes",
"[",
"process",
"]",
"[",
"r",
"]",
":",
"try",
... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector._cpu_load_parser | Parses the cpu load from the number of cpus and its usage
percentage and returnsde cpu/hour measure
Parameters
----------
cpus : str
Number of cpus allocated.
cpu_per : str
Percentage of cpu load measured (e.g.: 200,5%).
t : str
The ti... | flowcraft/generator/inspect.py | def _cpu_load_parser(self, cpus, cpu_per, t):
"""Parses the cpu load from the number of cpus and its usage
percentage and returnsde cpu/hour measure
Parameters
----------
cpus : str
Number of cpus allocated.
cpu_per : str
Percentage of cpu load me... | def _cpu_load_parser(self, cpus, cpu_per, t):
"""Parses the cpu load from the number of cpus and its usage
percentage and returnsde cpu/hour measure
Parameters
----------
cpus : str
Number of cpus allocated.
cpu_per : str
Percentage of cpu load me... | [
"Parses",
"the",
"cpu",
"load",
"from",
"the",
"number",
"of",
"cpus",
"and",
"its",
"usage",
"percentage",
"and",
"returnsde",
"cpu",
"/",
"hour",
"measure"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L729-L751 | [
"def",
"_cpu_load_parser",
"(",
"self",
",",
"cpus",
",",
"cpu_per",
",",
"t",
")",
":",
"try",
":",
"_cpus",
"=",
"float",
"(",
"cpus",
")",
"_cpu_per",
"=",
"float",
"(",
"cpu_per",
".",
"replace",
"(",
"\",\"",
",",
"\".\"",
")",
".",
"replace",
... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector._assess_resource_warnings | Assess whether the cpu load or memory usage is above the allocation
Parameters
----------
process : str
Process name
vals : vals
List of trace information for each tag of that process
Returns
-------
cpu_warnings : dict
Keys a... | flowcraft/generator/inspect.py | def _assess_resource_warnings(self, process, vals):
"""Assess whether the cpu load or memory usage is above the allocation
Parameters
----------
process : str
Process name
vals : vals
List of trace information for each tag of that process
Returns... | def _assess_resource_warnings(self, process, vals):
"""Assess whether the cpu load or memory usage is above the allocation
Parameters
----------
process : str
Process name
vals : vals
List of trace information for each tag of that process
Returns... | [
"Assess",
"whether",
"the",
"cpu",
"load",
"or",
"memory",
"usage",
"is",
"above",
"the",
"allocation"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L753-L799 | [
"def",
"_assess_resource_warnings",
"(",
"self",
",",
"process",
",",
"vals",
")",
":",
"cpu_warnings",
"=",
"{",
"}",
"mem_warnings",
"=",
"{",
"}",
"for",
"i",
"in",
"vals",
":",
"try",
":",
"expected_load",
"=",
"float",
"(",
"i",
"[",
"\"cpus\"",
"... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector._update_process_stats | Updates the process stats with the information from the processes
This method is called at the end of each static parsing of the nextflow
trace file. It re-populates the :attr:`process_stats` dictionary
with the new stat metrics. | flowcraft/generator/inspect.py | def _update_process_stats(self):
"""Updates the process stats with the information from the processes
This method is called at the end of each static parsing of the nextflow
trace file. It re-populates the :attr:`process_stats` dictionary
with the new stat metrics.
"""
... | def _update_process_stats(self):
"""Updates the process stats with the information from the processes
This method is called at the end of each static parsing of the nextflow
trace file. It re-populates the :attr:`process_stats` dictionary
with the new stat metrics.
"""
... | [
"Updates",
"the",
"process",
"stats",
"with",
"the",
"information",
"from",
"the",
"processes"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L801-L887 | [
"def",
"_update_process_stats",
"(",
"self",
")",
":",
"good_status",
"=",
"[",
"\"COMPLETED\"",
",",
"\"CACHED\"",
"]",
"for",
"process",
",",
"vals",
"in",
"self",
".",
"trace_info",
".",
"items",
"(",
")",
":",
"# Update submission status of tags for each proce... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector.trace_parser | Method that parses the trace file once and updates the
:attr:`status_info` attribute with the new entries. | flowcraft/generator/inspect.py | def trace_parser(self):
"""Method that parses the trace file once and updates the
:attr:`status_info` attribute with the new entries.
"""
# Check the timestamp of the tracefile. Only proceed with the parsing
# if it changed from the previous time.
size_stamp = os.path.ge... | def trace_parser(self):
"""Method that parses the trace file once and updates the
:attr:`status_info` attribute with the new entries.
"""
# Check the timestamp of the tracefile. Only proceed with the parsing
# if it changed from the previous time.
size_stamp = os.path.ge... | [
"Method",
"that",
"parses",
"the",
"trace",
"file",
"once",
"and",
"updates",
"the",
":",
"attr",
":",
"status_info",
"attribute",
"with",
"the",
"new",
"entries",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L893-L935 | [
"def",
"trace_parser",
"(",
"self",
")",
":",
"# Check the timestamp of the tracefile. Only proceed with the parsing",
"# if it changed from the previous time.",
"size_stamp",
"=",
"os",
".",
"path",
".",
"getsize",
"(",
"self",
".",
"trace_file",
")",
"self",
".",
"trace... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector.log_parser | Method that parses the nextflow log file once and updates the
submitted number of samples for each process | flowcraft/generator/inspect.py | def log_parser(self):
"""Method that parses the nextflow log file once and updates the
submitted number of samples for each process
"""
# Check the timestamp of the log file. Only proceed with the parsing
# if it changed from the previous time.
size_stamp = os.path.getsi... | def log_parser(self):
"""Method that parses the nextflow log file once and updates the
submitted number of samples for each process
"""
# Check the timestamp of the log file. Only proceed with the parsing
# if it changed from the previous time.
size_stamp = os.path.getsi... | [
"Method",
"that",
"parses",
"the",
"nextflow",
"log",
"file",
"once",
"and",
"updates",
"the",
"submitted",
"number",
"of",
"samples",
"for",
"each",
"process"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L937-L1018 | [
"def",
"log_parser",
"(",
"self",
")",
":",
"# Check the timestamp of the log file. Only proceed with the parsing",
"# if it changed from the previous time.",
"size_stamp",
"=",
"os",
".",
"path",
".",
"getsize",
"(",
"self",
".",
"log_file",
")",
"self",
".",
"log_retry"... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector.update_inspection | Wrapper method that calls the appropriate main updating methods of
the inspection.
It is meant to be used inside a loop (like while), so that it can
continuously update the class attributes from the trace and log files.
It already implements checks to parse these files only when they
... | flowcraft/generator/inspect.py | def update_inspection(self):
"""Wrapper method that calls the appropriate main updating methods of
the inspection.
It is meant to be used inside a loop (like while), so that it can
continuously update the class attributes from the trace and log files.
It already implements check... | def update_inspection(self):
"""Wrapper method that calls the appropriate main updating methods of
the inspection.
It is meant to be used inside a loop (like while), so that it can
continuously update the class attributes from the trace and log files.
It already implements check... | [
"Wrapper",
"method",
"that",
"calls",
"the",
"appropriate",
"main",
"updating",
"methods",
"of",
"the",
"inspection",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L1020-L1043 | [
"def",
"update_inspection",
"(",
"self",
")",
":",
"try",
":",
"self",
".",
"log_parser",
"(",
")",
"except",
"(",
"FileNotFoundError",
",",
"StopIteration",
")",
"as",
"e",
":",
"logger",
".",
"debug",
"(",
"\"ERROR: \"",
"+",
"str",
"(",
"sys",
".",
... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector.display_overview | Displays the default pipeline inspection overview | flowcraft/generator/inspect.py | def display_overview(self):
"""Displays the default pipeline inspection overview
"""
stay_alive = True
self.screen = curses.initscr()
self.screen.keypad(True)
self.screen.nodelay(-1)
curses.cbreak()
curses.noecho()
curses.start_color()
... | def display_overview(self):
"""Displays the default pipeline inspection overview
"""
stay_alive = True
self.screen = curses.initscr()
self.screen.keypad(True)
self.screen.nodelay(-1)
curses.cbreak()
curses.noecho()
curses.start_color()
... | [
"Displays",
"the",
"default",
"pipeline",
"inspection",
"overview"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L1049-L1087 | [
"def",
"display_overview",
"(",
"self",
")",
":",
"stay_alive",
"=",
"True",
"self",
".",
"screen",
"=",
"curses",
".",
"initscr",
"(",
")",
"self",
".",
"screen",
".",
"keypad",
"(",
"True",
")",
"self",
".",
"screen",
".",
"nodelay",
"(",
"-",
"1",... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector._updown | Provides curses scroll functionality. | flowcraft/generator/inspect.py | def _updown(self, direction):
"""Provides curses scroll functionality.
"""
if direction == "up" and self.top_line != 0:
self.top_line -= 1
elif direction == "down" and \
self.screen.getmaxyx()[0] + self.top_line\
<= self.content_lines + 3:
... | def _updown(self, direction):
"""Provides curses scroll functionality.
"""
if direction == "up" and self.top_line != 0:
self.top_line -= 1
elif direction == "down" and \
self.screen.getmaxyx()[0] + self.top_line\
<= self.content_lines + 3:
... | [
"Provides",
"curses",
"scroll",
"functionality",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L1108-L1117 | [
"def",
"_updown",
"(",
"self",
",",
"direction",
")",
":",
"if",
"direction",
"==",
"\"up\"",
"and",
"self",
".",
"top_line",
"!=",
"0",
":",
"self",
".",
"top_line",
"-=",
"1",
"elif",
"direction",
"==",
"\"down\"",
"and",
"self",
".",
"screen",
".",
... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector._rightleft | Provides curses horizontal padding | flowcraft/generator/inspect.py | def _rightleft(self, direction):
"""Provides curses horizontal padding"""
if direction == "left" and self.padding != 0:
self.padding -= 1
if direction == "right" and \
self.screen.getmaxyx()[1] + self.padding < self.max_width:
self.padding += 1 | def _rightleft(self, direction):
"""Provides curses horizontal padding"""
if direction == "left" and self.padding != 0:
self.padding -= 1
if direction == "right" and \
self.screen.getmaxyx()[1] + self.padding < self.max_width:
self.padding += 1 | [
"Provides",
"curses",
"horizontal",
"padding"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L1119-L1127 | [
"def",
"_rightleft",
"(",
"self",
",",
"direction",
")",
":",
"if",
"direction",
"==",
"\"left\"",
"and",
"self",
".",
"padding",
"!=",
"0",
":",
"self",
".",
"padding",
"-=",
"1",
"if",
"direction",
"==",
"\"right\"",
"and",
"self",
".",
"screen",
"."... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector.flush_overview | Displays the default overview of the pipeline execution from the
:attr:`status_info`, :attr:`processes` and :attr:`run_status`
attributes into stdout. | flowcraft/generator/inspect.py | def flush_overview(self):
"""Displays the default overview of the pipeline execution from the
:attr:`status_info`, :attr:`processes` and :attr:`run_status`
attributes into stdout.
"""
colors = {
"W": 1,
"R": 2,
"C": 3
}
pc = {... | def flush_overview(self):
"""Displays the default overview of the pipeline execution from the
:attr:`status_info`, :attr:`processes` and :attr:`run_status`
attributes into stdout.
"""
colors = {
"W": 1,
"R": 2,
"C": 3
}
pc = {... | [
"Displays",
"the",
"default",
"overview",
"of",
"the",
"pipeline",
"execution",
"from",
"the",
":",
"attr",
":",
"status_info",
":",
"attr",
":",
"processes",
"and",
":",
"attr",
":",
"run_status",
"attributes",
"into",
"stdout",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L1129-L1242 | [
"def",
"flush_overview",
"(",
"self",
")",
":",
"colors",
"=",
"{",
"\"W\"",
":",
"1",
",",
"\"R\"",
":",
"2",
",",
"\"C\"",
":",
"3",
"}",
"pc",
"=",
"{",
"\"running\"",
":",
"3",
",",
"\"complete\"",
":",
"3",
",",
"\"aborted\"",
":",
"4",
",",... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector._get_log_lines | Returns a list with the last ``n`` lines of the nextflow log file
Parameters
----------
n : int
Number of last lines from the log file
Returns
-------
list
List of strings with the nextflow log | flowcraft/generator/inspect.py | def _get_log_lines(self, n=300):
"""Returns a list with the last ``n`` lines of the nextflow log file
Parameters
----------
n : int
Number of last lines from the log file
Returns
-------
list
List of strings with the nextflow log
... | def _get_log_lines(self, n=300):
"""Returns a list with the last ``n`` lines of the nextflow log file
Parameters
----------
n : int
Number of last lines from the log file
Returns
-------
list
List of strings with the nextflow log
... | [
"Returns",
"a",
"list",
"with",
"the",
"last",
"n",
"lines",
"of",
"the",
"nextflow",
"log",
"file"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L1356-L1373 | [
"def",
"_get_log_lines",
"(",
"self",
",",
"n",
"=",
"300",
")",
":",
"with",
"open",
"(",
"self",
".",
"log_file",
")",
"as",
"fh",
":",
"last_lines",
"=",
"fh",
".",
"readlines",
"(",
")",
"[",
"-",
"n",
":",
"]",
"return",
"last_lines"
] | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector._prepare_static_info | Prepares the first batch of information, containing static
information such as the pipeline file, and configuration files
Returns
-------
dict
Dict with the static information for the first POST request | flowcraft/generator/inspect.py | def _prepare_static_info(self):
"""Prepares the first batch of information, containing static
information such as the pipeline file, and configuration files
Returns
-------
dict
Dict with the static information for the first POST request
"""
pipeline... | def _prepare_static_info(self):
"""Prepares the first batch of information, containing static
information such as the pipeline file, and configuration files
Returns
-------
dict
Dict with the static information for the first POST request
"""
pipeline... | [
"Prepares",
"the",
"first",
"batch",
"of",
"information",
"containing",
"static",
"information",
"such",
"as",
"the",
"pipeline",
"file",
"and",
"configuration",
"files"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L1432-L1465 | [
"def",
"_prepare_static_info",
"(",
"self",
")",
":",
"pipeline_files",
"=",
"{",
"}",
"with",
"open",
"(",
"join",
"(",
"self",
".",
"workdir",
",",
"self",
".",
"pipeline_name",
")",
")",
"as",
"fh",
":",
"pipeline_files",
"[",
"\"pipelineFile\"",
"]",
... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector._dag_file_to_dict | Function that opens the dotfile named .treeDag.json in the current
working directory
Returns
-------
Returns a dictionary with the dag object to be used in the post
instance available through the method _establish_connection | flowcraft/generator/inspect.py | def _dag_file_to_dict(self):
"""Function that opens the dotfile named .treeDag.json in the current
working directory
Returns
-------
Returns a dictionary with the dag object to be used in the post
instance available through the method _establish_connection
"""
... | def _dag_file_to_dict(self):
"""Function that opens the dotfile named .treeDag.json in the current
working directory
Returns
-------
Returns a dictionary with the dag object to be used in the post
instance available through the method _establish_connection
"""
... | [
"Function",
"that",
"opens",
"the",
"dotfile",
"named",
".",
"treeDag",
".",
"json",
"in",
"the",
"current",
"working",
"directory"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L1467-L1486 | [
"def",
"_dag_file_to_dict",
"(",
"self",
")",
":",
"try",
":",
"dag_file",
"=",
"open",
"(",
"os",
".",
"path",
".",
"join",
"(",
"self",
".",
"workdir",
",",
"\".treeDag.json\"",
")",
")",
"dag_json",
"=",
"json",
".",
"load",
"(",
"dag_file",
")",
... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowInspector._get_run_hash | Gets the hash of the nextflow file | flowcraft/generator/inspect.py | def _get_run_hash(self):
"""Gets the hash of the nextflow file"""
# Get name and path of the pipeline from the log file
pipeline_path = get_nextflow_filepath(self.log_file)
# Get hash from the entire pipeline file
pipeline_hash = hashlib.md5()
with open(pipeline_path, "... | def _get_run_hash(self):
"""Gets the hash of the nextflow file"""
# Get name and path of the pipeline from the log file
pipeline_path = get_nextflow_filepath(self.log_file)
# Get hash from the entire pipeline file
pipeline_hash = hashlib.md5()
with open(pipeline_path, "... | [
"Gets",
"the",
"hash",
"of",
"the",
"nextflow",
"file"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/inspect.py#L1533-L1550 | [
"def",
"_get_run_hash",
"(",
"self",
")",
":",
"# Get name and path of the pipeline from the log file",
"pipeline_path",
"=",
"get_nextflow_filepath",
"(",
"self",
".",
"log_file",
")",
"# Get hash from the entire pipeline file",
"pipeline_hash",
"=",
"hashlib",
".",
"md5",
... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | get_nextflow_filepath | Gets the nextflow file path from the nextflow log file. It searches for
the nextflow run command throughout the file.
Parameters
----------
log_file : str
Path for the .nextflow.log file
Returns
-------
str
Path for the nextflow file | flowcraft/generator/utils.py | def get_nextflow_filepath(log_file):
"""Gets the nextflow file path from the nextflow log file. It searches for
the nextflow run command throughout the file.
Parameters
----------
log_file : str
Path for the .nextflow.log file
Returns
-------
str
Path for the nextflow f... | def get_nextflow_filepath(log_file):
"""Gets the nextflow file path from the nextflow log file. It searches for
the nextflow run command throughout the file.
Parameters
----------
log_file : str
Path for the .nextflow.log file
Returns
-------
str
Path for the nextflow f... | [
"Gets",
"the",
"nextflow",
"file",
"path",
"from",
"the",
"nextflow",
"log",
"file",
".",
"It",
"searches",
"for",
"the",
"nextflow",
"run",
"command",
"throughout",
"the",
"file",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/utils.py#L9-L39 | [
"def",
"get_nextflow_filepath",
"(",
"log_file",
")",
":",
"with",
"open",
"(",
"log_file",
")",
"as",
"fh",
":",
"# Searches for the first occurence of the nextflow pipeline",
"# file name in the .nextflow.log file",
"while",
"1",
":",
"line",
"=",
"fh",
".",
"readline... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | main | Main executor of the split_fasta template.
Parameters
----------
sample_id : str
Sample Identification string.
assembly : list
Assembly file.
min_size : int
Minimum contig size. | flowcraft/templates/split_fasta.py | def main(sample_id, assembly, min_size):
"""Main executor of the split_fasta template.
Parameters
----------
sample_id : str
Sample Identification string.
assembly : list
Assembly file.
min_size : int
Minimum contig size.
"""
logger.info("Starting script")
... | def main(sample_id, assembly, min_size):
"""Main executor of the split_fasta template.
Parameters
----------
sample_id : str
Sample Identification string.
assembly : list
Assembly file.
min_size : int
Minimum contig size.
"""
logger.info("Starting script")
... | [
"Main",
"executor",
"of",
"the",
"split_fasta",
"template",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/split_fasta.py#L52-L84 | [
"def",
"main",
"(",
"sample_id",
",",
"assembly",
",",
"min_size",
")",
":",
"logger",
".",
"info",
"(",
"\"Starting script\"",
")",
"f_open",
"=",
"open",
"(",
"assembly",
",",
"\"rU\"",
")",
"entry",
"=",
"(",
"x",
"[",
"1",
"]",
"for",
"x",
"in",
... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | main | Parses a nextflow trace file, searches for processes with a specific tag
and sends a JSON report with the relevant information
The expected fields for the trace file are::
0. task_id
1. process
2. tag
3. status
4. exit code
5. start timestamp
6. containe... | flowcraft/templates/pipeline_status.py | def main(sample_id, trace_file, workdir):
"""
Parses a nextflow trace file, searches for processes with a specific tag
and sends a JSON report with the relevant information
The expected fields for the trace file are::
0. task_id
1. process
2. tag
3. status
4. ex... | def main(sample_id, trace_file, workdir):
"""
Parses a nextflow trace file, searches for processes with a specific tag
and sends a JSON report with the relevant information
The expected fields for the trace file are::
0. task_id
1. process
2. tag
3. status
4. ex... | [
"Parses",
"a",
"nextflow",
"trace",
"file",
"searches",
"for",
"processes",
"with",
"a",
"specific",
"tag",
"and",
"sends",
"a",
"JSON",
"report",
"with",
"the",
"relevant",
"information"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/pipeline_status.py#L88-L157 | [
"def",
"main",
"(",
"sample_id",
",",
"trace_file",
",",
"workdir",
")",
":",
"# Determine the path of the stored JSON for the sample_id",
"stats_suffix",
"=",
"\".stats.json\"",
"stats_path",
"=",
"join",
"(",
"workdir",
",",
"sample_id",
"+",
"stats_suffix",
")",
"t... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | brew_innuendo | Brews a given list of processes according to the recipe
Parameters
----------
args : argparse.Namespace
The arguments passed through argparser that will be used to check the
the recipe, tasks and brew the process
Returns
-------
str
The final pipeline string, ready for ... | flowcraft/generator/recipe.py | def brew_innuendo(args):
"""Brews a given list of processes according to the recipe
Parameters
----------
args : argparse.Namespace
The arguments passed through argparser that will be used to check the
the recipe, tasks and brew the process
Returns
-------
str
The f... | def brew_innuendo(args):
"""Brews a given list of processes according to the recipe
Parameters
----------
args : argparse.Namespace
The arguments passed through argparser that will be used to check the
the recipe, tasks and brew the process
Returns
-------
str
The f... | [
"Brews",
"a",
"given",
"list",
"of",
"processes",
"according",
"to",
"the",
"recipe"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/recipe.py#L528-L561 | [
"def",
"brew_innuendo",
"(",
"args",
")",
":",
"# Create recipe class instance",
"automatic_pipeline",
"=",
"Innuendo",
"(",
")",
"if",
"not",
"args",
".",
"tasks",
":",
"input_processes",
"=",
"\" \"",
".",
"join",
"(",
"automatic_pipeline",
".",
"process_descrip... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | brew_recipe | Returns a pipeline string from a recipe name.
Parameters
----------
recipe_name : str
Name of the recipe. Must match the name attribute in one of the classes
defined in :mod:`flowcraft.generator.recipes`
Returns
-------
str
Pipeline string ready for parsing and processi... | flowcraft/generator/recipe.py | def brew_recipe(recipe_name):
"""Returns a pipeline string from a recipe name.
Parameters
----------
recipe_name : str
Name of the recipe. Must match the name attribute in one of the classes
defined in :mod:`flowcraft.generator.recipes`
Returns
-------
str
Pipeline ... | def brew_recipe(recipe_name):
"""Returns a pipeline string from a recipe name.
Parameters
----------
recipe_name : str
Name of the recipe. Must match the name attribute in one of the classes
defined in :mod:`flowcraft.generator.recipes`
Returns
-------
str
Pipeline ... | [
"Returns",
"a",
"pipeline",
"string",
"from",
"a",
"recipe",
"name",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/recipe.py#L649-L688 | [
"def",
"brew_recipe",
"(",
"recipe_name",
")",
":",
"# This will iterate over all modules included in the recipes subpackage",
"# It will return the import class and the module name, algon with the",
"# correct prefix",
"prefix",
"=",
"\"{}.\"",
".",
"format",
"(",
"recipes",
".",
... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | list_recipes | Method that iterates over all available recipes and prints their
information to the standard output
Parameters
----------
full : bool
If true, it will provide the pipeline string along with the recipe name | flowcraft/generator/recipe.py | def list_recipes(full=False):
"""Method that iterates over all available recipes and prints their
information to the standard output
Parameters
----------
full : bool
If true, it will provide the pipeline string along with the recipe name
"""
logger.info(colored_print(
"\n=... | def list_recipes(full=False):
"""Method that iterates over all available recipes and prints their
information to the standard output
Parameters
----------
full : bool
If true, it will provide the pipeline string along with the recipe name
"""
logger.info(colored_print(
"\n=... | [
"Method",
"that",
"iterates",
"over",
"all",
"available",
"recipes",
"and",
"prints",
"their",
"information",
"to",
"the",
"standard",
"output"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/recipe.py#L691-L730 | [
"def",
"list_recipes",
"(",
"full",
"=",
"False",
")",
":",
"logger",
".",
"info",
"(",
"colored_print",
"(",
"\"\\n===== L I S T O F R E C I P E S =====\\n\"",
",",
"\"green_bold\"",
")",
")",
"# This will iterate over all modules included in the recipes subpackage",
"# ... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | InnuendoRecipe.validate_pipeline | Validate pipeline string
Validates the pipeline string by searching for forbidden characters
Parameters
----------
pipeline_string : str
STring with the processes provided
Returns
------- | flowcraft/generator/recipe.py | def validate_pipeline(pipeline_string):
"""Validate pipeline string
Validates the pipeline string by searching for forbidden characters
Parameters
----------
pipeline_string : str
STring with the processes provided
Returns
-------
"""
... | def validate_pipeline(pipeline_string):
"""Validate pipeline string
Validates the pipeline string by searching for forbidden characters
Parameters
----------
pipeline_string : str
STring with the processes provided
Returns
-------
"""
... | [
"Validate",
"pipeline",
"string"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/recipe.py#L54-L75 | [
"def",
"validate_pipeline",
"(",
"pipeline_string",
")",
":",
"if",
"\"(\"",
"in",
"pipeline_string",
"or",
"\")\"",
"in",
"pipeline_string",
"or",
"\"|\"",
"in",
"pipeline_string",
":",
"logger",
".",
"error",
"(",
"colored_print",
"(",
"\"Please provide a valid ta... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | InnuendoRecipe.build_upstream | Builds the upstream pipeline of the current process
Checks for the upstream processes to the current process and
adds them to the current pipeline fragment if they were provided in
the process list.
Parameters
----------
process_descriptions : dict
Informati... | flowcraft/generator/recipe.py | def build_upstream(self, process_descriptions, task, all_tasks,
task_pipeline,
count_forks, total_tasks, forks):
"""Builds the upstream pipeline of the current process
Checks for the upstream processes to the current process and
adds them to the cur... | def build_upstream(self, process_descriptions, task, all_tasks,
task_pipeline,
count_forks, total_tasks, forks):
"""Builds the upstream pipeline of the current process
Checks for the upstream processes to the current process and
adds them to the cur... | [
"Builds",
"the",
"upstream",
"pipeline",
"of",
"the",
"current",
"process"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/recipe.py#L77-L163 | [
"def",
"build_upstream",
"(",
"self",
",",
"process_descriptions",
",",
"task",
",",
"all_tasks",
",",
"task_pipeline",
",",
"count_forks",
",",
"total_tasks",
",",
"forks",
")",
":",
"if",
"task",
"in",
"process_descriptions",
":",
"if",
"process_descriptions",
... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | InnuendoRecipe.build_downstream | Builds the downstream pipeline of the current process
Checks for the downstream processes to the current process and
adds them to the current pipeline fragment.
Parameters
----------
process_descriptions : dict
Information of processes input, output and if is forkab... | flowcraft/generator/recipe.py | def build_downstream(self, process_descriptions, task, all_tasks,
task_pipeline,
count_forks, total_tasks, forks):
"""Builds the downstream pipeline of the current process
Checks for the downstream processes to the current process and
adds them ... | def build_downstream(self, process_descriptions, task, all_tasks,
task_pipeline,
count_forks, total_tasks, forks):
"""Builds the downstream pipeline of the current process
Checks for the downstream processes to the current process and
adds them ... | [
"Builds",
"the",
"downstream",
"pipeline",
"of",
"the",
"current",
"process"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/recipe.py#L165-L235 | [
"def",
"build_downstream",
"(",
"self",
",",
"process_descriptions",
",",
"task",
",",
"all_tasks",
",",
"task_pipeline",
",",
"count_forks",
",",
"total_tasks",
",",
"forks",
")",
":",
"if",
"task",
"in",
"process_descriptions",
":",
"if",
"process_descriptions",... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | InnuendoRecipe.define_pipeline_string | Builds the possible forks and connections between the provided
processes
This method loops through all the provided tasks and builds the
upstream and downstream pipeline if required. It then returns all
possible forks than need to be merged à posteriori`
Parameters
----... | flowcraft/generator/recipe.py | def define_pipeline_string(self, process_descriptions, tasks,
check_upstream,
check_downstream, count_forks, total_tasks,
forks):
"""Builds the possible forks and connections between the provided
processes
... | def define_pipeline_string(self, process_descriptions, tasks,
check_upstream,
check_downstream, count_forks, total_tasks,
forks):
"""Builds the possible forks and connections between the provided
processes
... | [
"Builds",
"the",
"possible",
"forks",
"and",
"connections",
"between",
"the",
"provided",
"processes"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/recipe.py#L237-L348 | [
"def",
"define_pipeline_string",
"(",
"self",
",",
"process_descriptions",
",",
"tasks",
",",
"check_upstream",
",",
"check_downstream",
",",
"count_forks",
",",
"total_tasks",
",",
"forks",
")",
":",
"tasks_array",
"=",
"tasks",
".",
"split",
"(",
")",
"for",
... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | InnuendoRecipe.build_pipeline_string | Parses, filters and merge all possible pipeline forks into the
final pipeline string
This method checks for shared start and end sections between forks
and merges them according to the shared processes::
[[spades, ...], [skesa, ...], [...,[spades, skesa]]]
-> [..., ... | flowcraft/generator/recipe.py | def build_pipeline_string(self, forks):
"""Parses, filters and merge all possible pipeline forks into the
final pipeline string
This method checks for shared start and end sections between forks
and merges them according to the shared processes::
[[spades, ...], [skesa, ...... | def build_pipeline_string(self, forks):
"""Parses, filters and merge all possible pipeline forks into the
final pipeline string
This method checks for shared start and end sections between forks
and merges them according to the shared processes::
[[spades, ...], [skesa, ...... | [
"Parses",
"filters",
"and",
"merge",
"all",
"possible",
"pipeline",
"forks",
"into",
"the",
"final",
"pipeline",
"string"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/recipe.py#L350-L453 | [
"def",
"build_pipeline_string",
"(",
"self",
",",
"forks",
")",
":",
"final_forks",
"=",
"[",
"]",
"for",
"i",
"in",
"range",
"(",
"0",
",",
"len",
"(",
"forks",
")",
")",
":",
"needs_merge",
"=",
"[",
"False",
",",
"0",
",",
"0",
",",
"0",
",",
... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | InnuendoRecipe.run_auto_pipeline | Main method to run the automatic pipeline creation
This method aggregates the functions required to build the pipeline
string that can be used as input for the workflow generator.
Parameters
----------
tasks : str
A string with the space separated tasks to be includ... | flowcraft/generator/recipe.py | def run_auto_pipeline(self, tasks):
"""Main method to run the automatic pipeline creation
This method aggregates the functions required to build the pipeline
string that can be used as input for the workflow generator.
Parameters
----------
tasks : str
A str... | def run_auto_pipeline(self, tasks):
"""Main method to run the automatic pipeline creation
This method aggregates the functions required to build the pipeline
string that can be used as input for the workflow generator.
Parameters
----------
tasks : str
A str... | [
"Main",
"method",
"to",
"run",
"the",
"automatic",
"pipeline",
"creation"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/recipe.py#L455-L485 | [
"def",
"run_auto_pipeline",
"(",
"self",
",",
"tasks",
")",
":",
"self",
".",
"forks",
"=",
"self",
".",
"define_pipeline_string",
"(",
"self",
".",
"process_descriptions",
",",
"tasks",
",",
"True",
",",
"True",
",",
"self",
".",
"count_forks",
",",
"task... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Recipe._get_component_str | Generates a component string based on the provided parameters and
directives
Parameters
----------
component : str
Component name
params : dict
Dictionary with parameter information
directives : dict
Dictionary with directives informat... | flowcraft/generator/recipe.py | def _get_component_str(component, params=None, directives=None):
""" Generates a component string based on the provided parameters and
directives
Parameters
----------
component : str
Component name
params : dict
Dictionary with parameter informat... | def _get_component_str(component, params=None, directives=None):
""" Generates a component string based on the provided parameters and
directives
Parameters
----------
component : str
Component name
params : dict
Dictionary with parameter informat... | [
"Generates",
"a",
"component",
"string",
"based",
"on",
"the",
"provided",
"parameters",
"and",
"directives"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/recipe.py#L614-L646 | [
"def",
"_get_component_str",
"(",
"component",
",",
"params",
"=",
"None",
",",
"directives",
"=",
"None",
")",
":",
"final_directives",
"=",
"{",
"}",
"if",
"directives",
":",
"final_directives",
"=",
"directives",
"if",
"params",
":",
"final_directives",
"["... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | write_report | Writes a report from multiple samples.
Parameters
----------
storage_dic : dict or :py:class:`OrderedDict`
Storage containing the trimming statistics. See :py:func:`parse_log`
for its generation.
output_file : str
Path where the output file will be generated.
sample_id : str... | flowcraft/templates/trimmomatic_report.py | def write_report(storage_dic, output_file, sample_id):
""" Writes a report from multiple samples.
Parameters
----------
storage_dic : dict or :py:class:`OrderedDict`
Storage containing the trimming statistics. See :py:func:`parse_log`
for its generation.
output_file : str
Pa... | def write_report(storage_dic, output_file, sample_id):
""" Writes a report from multiple samples.
Parameters
----------
storage_dic : dict or :py:class:`OrderedDict`
Storage containing the trimming statistics. See :py:func:`parse_log`
for its generation.
output_file : str
Pa... | [
"Writes",
"a",
"report",
"from",
"multiple",
"samples",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/trimmomatic_report.py#L117-L160 | [
"def",
"write_report",
"(",
"storage_dic",
",",
"output_file",
",",
"sample_id",
")",
":",
"with",
"open",
"(",
"output_file",
",",
"\"w\"",
")",
"as",
"fh",
",",
"open",
"(",
"\".report.json\"",
",",
"\"w\"",
")",
"as",
"json_rep",
":",
"# Write header",
... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | main | Main executor of the trimmomatic_report template.
Parameters
----------
log_files : list
List of paths to the trimmomatic log files. | flowcraft/templates/trimmomatic_report.py | def main(log_files):
""" Main executor of the trimmomatic_report template.
Parameters
----------
log_files : list
List of paths to the trimmomatic log files.
"""
log_storage = OrderedDict()
for log in log_files:
log_id = log.rstrip("_trimlog.txt")
# Populate stor... | def main(log_files):
""" Main executor of the trimmomatic_report template.
Parameters
----------
log_files : list
List of paths to the trimmomatic log files.
"""
log_storage = OrderedDict()
for log in log_files:
log_id = log.rstrip("_trimlog.txt")
# Populate stor... | [
"Main",
"executor",
"of",
"the",
"trimmomatic_report",
"template",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/trimmomatic_report.py#L164-L185 | [
"def",
"main",
"(",
"log_files",
")",
":",
"log_storage",
"=",
"OrderedDict",
"(",
")",
"for",
"log",
"in",
"log_files",
":",
"log_id",
"=",
"log",
".",
"rstrip",
"(",
"\"_trimlog.txt\"",
")",
"# Populate storage of current sample",
"log_storage",
"[",
"log_id",... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | fix_contig_names | Removes whitespace from the assembly contig names
Parameters
----------
asseembly_path : path to assembly file
Returns
-------
str:
Path to new assembly file with fixed contig names | flowcraft/templates/megahit.py | def fix_contig_names(asseembly_path):
"""Removes whitespace from the assembly contig names
Parameters
----------
asseembly_path : path to assembly file
Returns
-------
str:
Path to new assembly file with fixed contig names
"""
fixed_assembly = "fixed_assembly.fa"
with... | def fix_contig_names(asseembly_path):
"""Removes whitespace from the assembly contig names
Parameters
----------
asseembly_path : path to assembly file
Returns
-------
str:
Path to new assembly file with fixed contig names
"""
fixed_assembly = "fixed_assembly.fa"
with... | [
"Removes",
"whitespace",
"from",
"the",
"assembly",
"contig",
"names"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/megahit.py#L149-L174 | [
"def",
"fix_contig_names",
"(",
"asseembly_path",
")",
":",
"fixed_assembly",
"=",
"\"fixed_assembly.fa\"",
"with",
"open",
"(",
"asseembly_path",
")",
"as",
"in_hf",
",",
"open",
"(",
"fixed_assembly",
",",
"\"w\"",
")",
"as",
"ou_fh",
":",
"for",
"line",
"in... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | clean_up | Cleans the temporary fastq files. If they are symlinks, the link
source is removed
Parameters
----------
fastq : list
List of fastq files. | flowcraft/templates/megahit.py | def clean_up(fastq):
"""
Cleans the temporary fastq files. If they are symlinks, the link
source is removed
Parameters
----------
fastq : list
List of fastq files.
"""
for fq in fastq:
# Get real path of fastq files, following symlinks
rp = os.path.realpath(fq)
... | def clean_up(fastq):
"""
Cleans the temporary fastq files. If they are symlinks, the link
source is removed
Parameters
----------
fastq : list
List of fastq files.
"""
for fq in fastq:
# Get real path of fastq files, following symlinks
rp = os.path.realpath(fq)
... | [
"Cleans",
"the",
"temporary",
"fastq",
"files",
".",
"If",
"they",
"are",
"symlinks",
"the",
"link",
"source",
"is",
"removed"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/megahit.py#L177-L193 | [
"def",
"clean_up",
"(",
"fastq",
")",
":",
"for",
"fq",
"in",
"fastq",
":",
"# Get real path of fastq files, following symlinks",
"rp",
"=",
"os",
".",
"path",
".",
"realpath",
"(",
"fq",
")",
"logger",
".",
"debug",
"(",
"\"Removing temporary fastq file path: {}\... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Abricate.parse_files | Public method for parsing abricate output files.
This method is called at at class instantiation for the provided
output files. Additional abricate output files can be added using
this method after the class instantiation.
Parameters
----------
fls : list
Li... | flowcraft/templates/process_abricate.py | def parse_files(self, fls):
"""Public method for parsing abricate output files.
This method is called at at class instantiation for the provided
output files. Additional abricate output files can be added using
this method after the class instantiation.
Parameters
-----... | def parse_files(self, fls):
"""Public method for parsing abricate output files.
This method is called at at class instantiation for the provided
output files. Additional abricate output files can be added using
this method after the class instantiation.
Parameters
-----... | [
"Public",
"method",
"for",
"parsing",
"abricate",
"output",
"files",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/process_abricate.py#L131-L150 | [
"def",
"parse_files",
"(",
"self",
",",
"fls",
")",
":",
"for",
"f",
"in",
"fls",
":",
"# Make sure paths exists",
"if",
"os",
".",
"path",
".",
"exists",
"(",
"f",
")",
":",
"self",
".",
"_parser",
"(",
"f",
")",
"else",
":",
"logger",
".",
"warni... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Abricate._parser | Parser for a single abricate output file.
This parser will scan a single Abricate output file and populate
the :py:attr:`Abricate.storage` attribute.
Parameters
----------
fl : str
Path to abricate output file
Notes
-----
This method will po... | flowcraft/templates/process_abricate.py | def _parser(self, fl):
"""Parser for a single abricate output file.
This parser will scan a single Abricate output file and populate
the :py:attr:`Abricate.storage` attribute.
Parameters
----------
fl : str
Path to abricate output file
Notes
... | def _parser(self, fl):
"""Parser for a single abricate output file.
This parser will scan a single Abricate output file and populate
the :py:attr:`Abricate.storage` attribute.
Parameters
----------
fl : str
Path to abricate output file
Notes
... | [
"Parser",
"for",
"a",
"single",
"abricate",
"output",
"file",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/process_abricate.py#L152-L207 | [
"def",
"_parser",
"(",
"self",
",",
"fl",
")",
":",
"with",
"open",
"(",
"fl",
")",
"as",
"fh",
":",
"for",
"line",
"in",
"fh",
":",
"# Skip header and comment lines",
"if",
"line",
".",
"startswith",
"(",
"\"#\"",
")",
"or",
"line",
".",
"strip",
"(... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Abricate.iter_filter | General purpose filter iterator.
This general filter iterator allows the filtering of entries based
on one or more custom filters. These filters must contain
an entry of the `storage` attribute, a comparison operator, and the
test value. For example, to filter out entries with coverage ... | flowcraft/templates/process_abricate.py | def iter_filter(self, filters, databases=None, fields=None,
filter_behavior="and"):
"""General purpose filter iterator.
This general filter iterator allows the filtering of entries based
on one or more custom filters. These filters must contain
an entry of the `stora... | def iter_filter(self, filters, databases=None, fields=None,
filter_behavior="and"):
"""General purpose filter iterator.
This general filter iterator allows the filtering of entries based
on one or more custom filters. These filters must contain
an entry of the `stora... | [
"General",
"purpose",
"filter",
"iterator",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/process_abricate.py#L242-L340 | [
"def",
"iter_filter",
"(",
"self",
",",
"filters",
",",
"databases",
"=",
"None",
",",
"fields",
"=",
"None",
",",
"filter_behavior",
"=",
"\"and\"",
")",
":",
"if",
"filter_behavior",
"not",
"in",
"[",
"\"and\"",
",",
"\"or\"",
"]",
":",
"raise",
"Value... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | AbricateReport._get_contig_id | Tries to retrieve contig id. Returns the original string if it
is unable to retrieve the id.
Parameters
----------
contig_str : str
Full contig string (fasta header)
Returns
-------
str
Contig id | flowcraft/templates/process_abricate.py | def _get_contig_id(contig_str):
"""Tries to retrieve contig id. Returns the original string if it
is unable to retrieve the id.
Parameters
----------
contig_str : str
Full contig string (fasta header)
Returns
-------
str
Contig id... | def _get_contig_id(contig_str):
"""Tries to retrieve contig id. Returns the original string if it
is unable to retrieve the id.
Parameters
----------
contig_str : str
Full contig string (fasta header)
Returns
-------
str
Contig id... | [
"Tries",
"to",
"retrieve",
"contig",
"id",
".",
"Returns",
"the",
"original",
"string",
"if",
"it",
"is",
"unable",
"to",
"retrieve",
"the",
"id",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/process_abricate.py#L380-L407 | [
"def",
"_get_contig_id",
"(",
"contig_str",
")",
":",
"contig_id",
"=",
"contig_str",
"try",
":",
"contig_id",
"=",
"re",
".",
"search",
"(",
"\".*NODE_([0-9]*)_.*\"",
",",
"contig_str",
")",
".",
"group",
"(",
"1",
")",
"except",
"AttributeError",
":",
"pas... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | AbricateReport.get_plot_data | Generates the JSON report to plot the gene boxes
Following the convention of the reports platform, this method returns
a list of JSON/dict objects with the information about each entry in
the abricate file. The information contained in this JSON is::
{contig_id: <str>,
... | flowcraft/templates/process_abricate.py | def get_plot_data(self):
""" Generates the JSON report to plot the gene boxes
Following the convention of the reports platform, this method returns
a list of JSON/dict objects with the information about each entry in
the abricate file. The information contained in this JSON is::
... | def get_plot_data(self):
""" Generates the JSON report to plot the gene boxes
Following the convention of the reports platform, this method returns
a list of JSON/dict objects with the information about each entry in
the abricate file. The information contained in this JSON is::
... | [
"Generates",
"the",
"JSON",
"report",
"to",
"plot",
"the",
"gene",
"boxes"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/process_abricate.py#L409-L474 | [
"def",
"get_plot_data",
"(",
"self",
")",
":",
"json_dic",
"=",
"{",
"\"plotData\"",
":",
"[",
"]",
"}",
"sample_dic",
"=",
"{",
"}",
"sample_assembly_map",
"=",
"{",
"}",
"for",
"entry",
"in",
"self",
".",
"storage",
".",
"values",
"(",
")",
":",
"s... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | AbricateReport.write_report_data | Writes the JSON report to a json file | flowcraft/templates/process_abricate.py | def write_report_data(self):
"""Writes the JSON report to a json file
"""
json_plot = self.get_plot_data()
json_table = self.get_table_data()
json_dic = {**json_plot, **json_table}
with open(".report.json", "w") as json_report:
json_report.write(json.dumps(... | def write_report_data(self):
"""Writes the JSON report to a json file
"""
json_plot = self.get_plot_data()
json_table = self.get_table_data()
json_dic = {**json_plot, **json_table}
with open(".report.json", "w") as json_report:
json_report.write(json.dumps(... | [
"Writes",
"the",
"JSON",
"report",
"to",
"a",
"json",
"file"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/process_abricate.py#L527-L537 | [
"def",
"write_report_data",
"(",
"self",
")",
":",
"json_plot",
"=",
"self",
".",
"get_plot_data",
"(",
")",
"json_table",
"=",
"self",
".",
"get_table_data",
"(",
")",
"json_dic",
"=",
"{",
"*",
"*",
"json_plot",
",",
"*",
"*",
"json_table",
"}",
"with"... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | main | Main executor of the assembly_report template.
Parameters
----------
sample_id : str
Sample Identification string.
assembly_file : str
Path to assembly file in Fasta format. | flowcraft/templates/assembly_report.py | def main(sample_id, assembly_file, coverage_bp_file=None):
"""Main executor of the assembly_report template.
Parameters
----------
sample_id : str
Sample Identification string.
assembly_file : str
Path to assembly file in Fasta format.
"""
logger.info("Starting assembly re... | def main(sample_id, assembly_file, coverage_bp_file=None):
"""Main executor of the assembly_report template.
Parameters
----------
sample_id : str
Sample Identification string.
assembly_file : str
Path to assembly file in Fasta format.
"""
logger.info("Starting assembly re... | [
"Main",
"executor",
"of",
"the",
"assembly_report",
"template",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/assembly_report.py#L423-L498 | [
"def",
"main",
"(",
"sample_id",
",",
"assembly_file",
",",
"coverage_bp_file",
"=",
"None",
")",
":",
"logger",
".",
"info",
"(",
"\"Starting assembly report\"",
")",
"assembly_obj",
"=",
"Assembly",
"(",
"assembly_file",
",",
"sample_id",
")",
"logger",
".",
... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Assembly._parse_assembly | Parse an assembly file in fasta format.
This is a Fasta parsing method that populates the
:py:attr:`Assembly.contigs` attribute with data for each contig in the
assembly.
Parameters
----------
assembly_file : str
Path to the assembly fasta file. | flowcraft/templates/assembly_report.py | def _parse_assembly(self, assembly_file):
"""Parse an assembly file in fasta format.
This is a Fasta parsing method that populates the
:py:attr:`Assembly.contigs` attribute with data for each contig in the
assembly.
Parameters
----------
assembly_file : str
... | def _parse_assembly(self, assembly_file):
"""Parse an assembly file in fasta format.
This is a Fasta parsing method that populates the
:py:attr:`Assembly.contigs` attribute with data for each contig in the
assembly.
Parameters
----------
assembly_file : str
... | [
"Parse",
"an",
"assembly",
"file",
"in",
"fasta",
"format",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/assembly_report.py#L143-L181 | [
"def",
"_parse_assembly",
"(",
"self",
",",
"assembly_file",
")",
":",
"with",
"open",
"(",
"assembly_file",
")",
"as",
"fh",
":",
"header",
"=",
"None",
"logger",
".",
"debug",
"(",
"\"Starting iteration of assembly file: {}\"",
".",
"format",
"(",
"assembly_fi... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Assembly.get_summary_stats | Generates a CSV report with summary statistics about the assembly
The calculated statistics are:
- Number of contigs
- Average contig size
- N50
- Total assembly length
- Average GC content
- Amount of missing data
Parameters
... | flowcraft/templates/assembly_report.py | def get_summary_stats(self, output_csv=None):
"""Generates a CSV report with summary statistics about the assembly
The calculated statistics are:
- Number of contigs
- Average contig size
- N50
- Total assembly length
- Average GC content
... | def get_summary_stats(self, output_csv=None):
"""Generates a CSV report with summary statistics about the assembly
The calculated statistics are:
- Number of contigs
- Average contig size
- N50
- Total assembly length
- Average GC content
... | [
"Generates",
"a",
"CSV",
"report",
"with",
"summary",
"statistics",
"about",
"the",
"assembly"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/assembly_report.py#L213-L282 | [
"def",
"get_summary_stats",
"(",
"self",
",",
"output_csv",
"=",
"None",
")",
":",
"contig_size_list",
"=",
"[",
"]",
"self",
".",
"summary_info",
"[",
"\"ncontigs\"",
"]",
"=",
"len",
"(",
"self",
".",
"contigs",
")",
"for",
"contig_id",
",",
"sequence",
... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Assembly._get_window_labels | Returns the mapping between sliding window points and their contigs,
and the x-axis position of contig
Parameters
----------
window : int
Size of the window.
Returns
-------
xbars : list
The x-axis position of the ending for each contig.
... | flowcraft/templates/assembly_report.py | def _get_window_labels(self, window):
"""Returns the mapping between sliding window points and their contigs,
and the x-axis position of contig
Parameters
----------
window : int
Size of the window.
Returns
-------
xbars : list
Th... | def _get_window_labels(self, window):
"""Returns the mapping between sliding window points and their contigs,
and the x-axis position of contig
Parameters
----------
window : int
Size of the window.
Returns
-------
xbars : list
Th... | [
"Returns",
"the",
"mapping",
"between",
"sliding",
"window",
"points",
"and",
"their",
"contigs",
"and",
"the",
"x",
"-",
"axis",
"position",
"of",
"contig"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/assembly_report.py#L284-L315 | [
"def",
"_get_window_labels",
"(",
"self",
",",
"window",
")",
":",
"# Get summary stats, if they have not yet been triggered",
"if",
"not",
"self",
".",
"summary_info",
":",
"self",
".",
"get_summary_stats",
"(",
")",
"# Get contig boundary positon",
"c",
"=",
"0",
"x... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Assembly._gc_prop | Get proportion of GC from a string
Parameters
----------
s : str
Arbitrary string
Returns
-------
x : float
GC proportion. | flowcraft/templates/assembly_report.py | def _gc_prop(s, length):
"""Get proportion of GC from a string
Parameters
----------
s : str
Arbitrary string
Returns
-------
x : float
GC proportion.
"""
gc = sum(map(s.count, ["c", "g"]))
return gc / length | def _gc_prop(s, length):
"""Get proportion of GC from a string
Parameters
----------
s : str
Arbitrary string
Returns
-------
x : float
GC proportion.
"""
gc = sum(map(s.count, ["c", "g"]))
return gc / length | [
"Get",
"proportion",
"of",
"GC",
"from",
"a",
"string"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/assembly_report.py#L318-L334 | [
"def",
"_gc_prop",
"(",
"s",
",",
"length",
")",
":",
"gc",
"=",
"sum",
"(",
"map",
"(",
"s",
".",
"count",
",",
"[",
"\"c\"",
",",
"\"g\"",
"]",
")",
")",
"return",
"gc",
"/",
"length"
] | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Assembly.get_gc_sliding | Calculates a sliding window of the GC content for the assembly
Returns
-------
gc_res : list
List of GC proportion floats for each data point in the sliding
window | flowcraft/templates/assembly_report.py | def get_gc_sliding(self, window=2000):
"""Calculates a sliding window of the GC content for the assembly
Returns
-------
gc_res : list
List of GC proportion floats for each data point in the sliding
window
"""
gc_res = []
# Get complete... | def get_gc_sliding(self, window=2000):
"""Calculates a sliding window of the GC content for the assembly
Returns
-------
gc_res : list
List of GC proportion floats for each data point in the sliding
window
"""
gc_res = []
# Get complete... | [
"Calculates",
"a",
"sliding",
"window",
"of",
"the",
"GC",
"content",
"for",
"the",
"assembly"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/assembly_report.py#L336-L359 | [
"def",
"get_gc_sliding",
"(",
"self",
",",
"window",
"=",
"2000",
")",
":",
"gc_res",
"=",
"[",
"]",
"# Get complete sequence to calculate sliding window values",
"complete_seq",
"=",
"\"\"",
".",
"join",
"(",
"self",
".",
"contigs",
".",
"values",
"(",
")",
"... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | main | Main executor of the skesa template.
Parameters
----------
sample_id : str
Sample Identification string.
fastq_pair : list
Two element list containing the paired FastQ files.
clear : str
Can be either 'true' or 'false'. If 'true', the input fastq files will
be remove... | flowcraft/templates/skesa.py | def main(sample_id, fastq_pair, clear):
"""Main executor of the skesa template.
Parameters
----------
sample_id : str
Sample Identification string.
fastq_pair : list
Two element list containing the paired FastQ files.
clear : str
Can be either 'true' or 'false'. If 'true... | def main(sample_id, fastq_pair, clear):
"""Main executor of the skesa template.
Parameters
----------
sample_id : str
Sample Identification string.
fastq_pair : list
Two element list containing the paired FastQ files.
clear : str
Can be either 'true' or 'false'. If 'true... | [
"Main",
"executor",
"of",
"the",
"skesa",
"template",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/skesa.py#L104-L168 | [
"def",
"main",
"(",
"sample_id",
",",
"fastq_pair",
",",
"clear",
")",
":",
"logger",
".",
"info",
"(",
"\"Starting skesa\"",
")",
"# Determine output file",
"if",
"\"_trim.\"",
"in",
"fastq_pair",
"[",
"0",
"]",
":",
"sample_id",
"+=",
"\"_trim\"",
"version",... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | write_json_report | Writes the report
Parameters
----------
data1
data2
Returns
------- | flowcraft/templates/fastqc_report.py | def write_json_report(sample_id, data1, data2):
"""Writes the report
Parameters
----------
data1
data2
Returns
-------
"""
parser_map = {
"base_sequence_quality": ">>Per base sequence quality",
"sequence_quality": ">>Per sequence quality scores",
"base_gc_... | def write_json_report(sample_id, data1, data2):
"""Writes the report
Parameters
----------
data1
data2
Returns
-------
"""
parser_map = {
"base_sequence_quality": ">>Per base sequence quality",
"sequence_quality": ">>Per sequence quality scores",
"base_gc_... | [
"Writes",
"the",
"report"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/fastqc_report.py#L131-L189 | [
"def",
"write_json_report",
"(",
"sample_id",
",",
"data1",
",",
"data2",
")",
":",
"parser_map",
"=",
"{",
"\"base_sequence_quality\"",
":",
"\">>Per base sequence quality\"",
",",
"\"sequence_quality\"",
":",
"\">>Per sequence quality scores\"",
",",
"\"base_gc_content\""... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | get_trim_index | Returns the trim index from a ``bool`` list
Provided with a list of ``bool`` elements (``[False, False, True, True]``),
this function will assess the index of the list that minimizes the number
of True elements (biased positions) at the extremities. To do so,
it will iterate over the boolean list and f... | flowcraft/templates/fastqc_report.py | def get_trim_index(biased_list):
"""Returns the trim index from a ``bool`` list
Provided with a list of ``bool`` elements (``[False, False, True, True]``),
this function will assess the index of the list that minimizes the number
of True elements (biased positions) at the extremities. To do so,
it ... | def get_trim_index(biased_list):
"""Returns the trim index from a ``bool`` list
Provided with a list of ``bool`` elements (``[False, False, True, True]``),
this function will assess the index of the list that minimizes the number
of True elements (biased positions) at the extremities. To do so,
it ... | [
"Returns",
"the",
"trim",
"index",
"from",
"a",
"bool",
"list"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/fastqc_report.py#L192-L241 | [
"def",
"get_trim_index",
"(",
"biased_list",
")",
":",
"# Return index 0 if there are no biased positions",
"if",
"set",
"(",
"biased_list",
")",
"==",
"{",
"False",
"}",
":",
"return",
"0",
"if",
"set",
"(",
"biased_list",
"[",
":",
"5",
"]",
")",
"==",
"{"... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | trim_range | Assess the optimal trim range for a given FastQC data file.
This function will parse a single FastQC data file, namely the
*'Per base sequence content'* category. It will retrieve the A/T and G/C
content for each nucleotide position in the reads, and check whether the
G/C and A/T proportions are betwee... | flowcraft/templates/fastqc_report.py | def trim_range(data_file):
"""Assess the optimal trim range for a given FastQC data file.
This function will parse a single FastQC data file, namely the
*'Per base sequence content'* category. It will retrieve the A/T and G/C
content for each nucleotide position in the reads, and check whether the
... | def trim_range(data_file):
"""Assess the optimal trim range for a given FastQC data file.
This function will parse a single FastQC data file, namely the
*'Per base sequence content'* category. It will retrieve the A/T and G/C
content for each nucleotide position in the reads, and check whether the
... | [
"Assess",
"the",
"optimal",
"trim",
"range",
"for",
"a",
"given",
"FastQC",
"data",
"file",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/fastqc_report.py#L244-L321 | [
"def",
"trim_range",
"(",
"data_file",
")",
":",
"logger",
".",
"debug",
"(",
"\"Starting trim range assessment\"",
")",
"# Target string for nucleotide bias assessment",
"target_nuc_bias",
"=",
"\">>Per base sequence content\"",
"logger",
".",
"debug",
"(",
"\"Target string ... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | get_sample_trim | Get the optimal read trim range from data files of paired FastQ reads.
Given the FastQC data report files for paired-end FastQ reads, this
function will assess the optimal trim range for the 3' and 5' ends of
the paired-end reads. This assessment will be based on the *'Per sequence
GC content'*.
P... | flowcraft/templates/fastqc_report.py | def get_sample_trim(p1_data, p2_data):
"""Get the optimal read trim range from data files of paired FastQ reads.
Given the FastQC data report files for paired-end FastQ reads, this
function will assess the optimal trim range for the 3' and 5' ends of
the paired-end reads. This assessment will be based ... | def get_sample_trim(p1_data, p2_data):
"""Get the optimal read trim range from data files of paired FastQ reads.
Given the FastQC data report files for paired-end FastQ reads, this
function will assess the optimal trim range for the 3' and 5' ends of
the paired-end reads. This assessment will be based ... | [
"Get",
"the",
"optimal",
"read",
"trim",
"range",
"from",
"data",
"files",
"of",
"paired",
"FastQ",
"reads",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/fastqc_report.py#L324-L359 | [
"def",
"get_sample_trim",
"(",
"p1_data",
",",
"p2_data",
")",
":",
"sample_ranges",
"=",
"[",
"trim_range",
"(",
"x",
")",
"for",
"x",
"in",
"[",
"p1_data",
",",
"p2_data",
"]",
"]",
"# Get the optimal trim position for 5' end",
"optimal_5trim",
"=",
"max",
"... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | get_summary | Parses a FastQC summary report file and returns it as a dictionary.
This function parses a typical FastQC summary report file, retrieving
only the information on the first two columns. For instance, a line could
be::
'PASS Basic Statistics SH10762A_1.fastq.gz'
This parser will build a diction... | flowcraft/templates/fastqc_report.py | def get_summary(summary_file):
"""Parses a FastQC summary report file and returns it as a dictionary.
This function parses a typical FastQC summary report file, retrieving
only the information on the first two columns. For instance, a line could
be::
'PASS Basic Statistics SH10762A_1.fastq.gz'... | def get_summary(summary_file):
"""Parses a FastQC summary report file and returns it as a dictionary.
This function parses a typical FastQC summary report file, retrieving
only the information on the first two columns. For instance, a line could
be::
'PASS Basic Statistics SH10762A_1.fastq.gz'... | [
"Parses",
"a",
"FastQC",
"summary",
"report",
"file",
"and",
"returns",
"it",
"as",
"a",
"dictionary",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/fastqc_report.py#L362-L406 | [
"def",
"get_summary",
"(",
"summary_file",
")",
":",
"summary_info",
"=",
"OrderedDict",
"(",
")",
"logger",
".",
"debug",
"(",
"\"Retrieving summary information from file: {}\"",
".",
"format",
"(",
"summary_file",
")",
")",
"with",
"open",
"(",
"summary_file",
"... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | check_summary_health | Checks the health of a sample from the FastQC summary file.
Parses the FastQC summary file and tests whether the sample is good
or not. There are four categories that cannot fail, and two that
must pass in order for the sample pass this check. If the sample fails
the quality checks, a list with the fai... | flowcraft/templates/fastqc_report.py | def check_summary_health(summary_file, **kwargs):
"""Checks the health of a sample from the FastQC summary file.
Parses the FastQC summary file and tests whether the sample is good
or not. There are four categories that cannot fail, and two that
must pass in order for the sample pass this check. If the... | def check_summary_health(summary_file, **kwargs):
"""Checks the health of a sample from the FastQC summary file.
Parses the FastQC summary file and tests whether the sample is good
or not. There are four categories that cannot fail, and two that
must pass in order for the sample pass this check. If the... | [
"Checks",
"the",
"health",
"of",
"a",
"sample",
"from",
"the",
"FastQC",
"summary",
"file",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/fastqc_report.py#L409-L517 | [
"def",
"check_summary_health",
"(",
"summary_file",
",",
"*",
"*",
"kwargs",
")",
":",
"# Store the summary categories that cannot fail. If they fail, do not",
"# proceed with this sample",
"fail_sensitive",
"=",
"kwargs",
".",
"get",
"(",
"\"fail_sensitive\"",
",",
"[",
"\... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | main | Main executor of the fastqc_report template.
If the "--ignore-tests" option is present in the ``opts`` argument,
the health check of the sample will be bypassed, and it will pass the
check. This option is used in the first run of FastQC. In the second
run (after filtering with trimmomatic) this option ... | flowcraft/templates/fastqc_report.py | def main(sample_id, result_p1, result_p2, opts):
"""Main executor of the fastqc_report template.
If the "--ignore-tests" option is present in the ``opts`` argument,
the health check of the sample will be bypassed, and it will pass the
check. This option is used in the first run of FastQC. In the second... | def main(sample_id, result_p1, result_p2, opts):
"""Main executor of the fastqc_report template.
If the "--ignore-tests" option is present in the ``opts`` argument,
the health check of the sample will be bypassed, and it will pass the
check. This option is used in the first run of FastQC. In the second... | [
"Main",
"executor",
"of",
"the",
"fastqc_report",
"template",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/fastqc_report.py#L521-L639 | [
"def",
"main",
"(",
"sample_id",
",",
"result_p1",
",",
"result_p2",
",",
"opts",
")",
":",
"logger",
".",
"info",
"(",
"\"Starting fastqc report\"",
")",
"json_dic",
"=",
"{",
"}",
"with",
"open",
"(",
"\"{}_trim_report\"",
".",
"format",
"(",
"sample_id",
... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | main | Main executor of the process_mapping template.
Parameters
----------
sample_id : str
Sample Identification string.
boetie_log: str
Path to the log file generated by bowtie. | flowcraft/templates/process_mapping.py | def main(sample_id, bowite_log):
"""Main executor of the process_mapping template.
Parameters
----------
sample_id : str
Sample Identification string.
boetie_log: str
Path to the log file generated by bowtie.
"""
logger.info("Starting mapping file processing")
warnings... | def main(sample_id, bowite_log):
"""Main executor of the process_mapping template.
Parameters
----------
sample_id : str
Sample Identification string.
boetie_log: str
Path to the log file generated by bowtie.
"""
logger.info("Starting mapping file processing")
warnings... | [
"Main",
"executor",
"of",
"the",
"process_mapping",
"template",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/process_mapping.py#L196-L263 | [
"def",
"main",
"(",
"sample_id",
",",
"bowite_log",
")",
":",
"logger",
".",
"info",
"(",
"\"Starting mapping file processing\"",
")",
"warnings",
"=",
"[",
"]",
"fails",
"=",
"\"\"",
"bowtie_info",
"=",
"Bowtie",
"(",
"sample_id",
",",
"bowite_log",
")",
"p... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | Bowtie.parse_log | Parse a bowtie log file.
This is a bowtie log parsing method that populates the
:py:attr:`self.n_reads, self.align_0x, self.align_1x, self.align_mt1x and self.overall_rate` attributes with
data from the log file.
Disclamer: THIS METHOD IS HORRIBLE BECAUSE THE BOWTIE LOG IS HORRIBLE.
... | flowcraft/templates/process_mapping.py | def parse_log(self, bowtie_log):
"""Parse a bowtie log file.
This is a bowtie log parsing method that populates the
:py:attr:`self.n_reads, self.align_0x, self.align_1x, self.align_mt1x and self.overall_rate` attributes with
data from the log file.
Disclamer: THIS METHOD IS HOR... | def parse_log(self, bowtie_log):
"""Parse a bowtie log file.
This is a bowtie log parsing method that populates the
:py:attr:`self.n_reads, self.align_0x, self.align_1x, self.align_mt1x and self.overall_rate` attributes with
data from the log file.
Disclamer: THIS METHOD IS HOR... | [
"Parse",
"a",
"bowtie",
"log",
"file",
"."
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/templates/process_mapping.py#L103-L192 | [
"def",
"parse_log",
"(",
"self",
",",
"bowtie_log",
")",
":",
"print",
"(",
"\"is here!\"",
")",
"# Regexes - thanks to https://github.com/ewels/MultiQC/blob/master/multiqc/modules/bowtie2/bowtie2.py",
"regexes",
"=",
"{",
"'unpaired'",
":",
"{",
"'unpaired_aligned_none'",
":... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowGenerator._parse_process_name | Parses the process string and returns the process name and its
directives
Process strings my contain directive information with the following
syntax::
proc_name={'directive':'val'}
This method parses this string and returns the process name as a
string and the dire... | flowcraft/generator/engine.py | def _parse_process_name(name_str):
"""Parses the process string and returns the process name and its
directives
Process strings my contain directive information with the following
syntax::
proc_name={'directive':'val'}
This method parses this string and returns the... | def _parse_process_name(name_str):
"""Parses the process string and returns the process name and its
directives
Process strings my contain directive information with the following
syntax::
proc_name={'directive':'val'}
This method parses this string and returns the... | [
"Parses",
"the",
"process",
"string",
"and",
"returns",
"the",
"process",
"name",
"and",
"its",
"directives"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/engine.py#L184-L230 | [
"def",
"_parse_process_name",
"(",
"name_str",
")",
":",
"directives",
"=",
"None",
"fields",
"=",
"name_str",
".",
"split",
"(",
"\"=\"",
")",
"process_name",
"=",
"fields",
"[",
"0",
"]",
"if",
"len",
"(",
"fields",
")",
"==",
"2",
":",
"_directives",
... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowGenerator._build_connections | Parses the process connections dictionaries into a process list
This method is called upon instantiation of the NextflowGenerator
class. Essentially, it sets the main input/output channel names of the
processes so that they can be linked correctly.
If a connection between two consecuti... | flowcraft/generator/engine.py | def _build_connections(self, process_list, ignore_dependencies,
auto_dependency):
"""Parses the process connections dictionaries into a process list
This method is called upon instantiation of the NextflowGenerator
class. Essentially, it sets the main input/output cha... | def _build_connections(self, process_list, ignore_dependencies,
auto_dependency):
"""Parses the process connections dictionaries into a process list
This method is called upon instantiation of the NextflowGenerator
class. Essentially, it sets the main input/output cha... | [
"Parses",
"the",
"process",
"connections",
"dictionaries",
"into",
"a",
"process",
"list"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/engine.py#L232-L372 | [
"def",
"_build_connections",
"(",
"self",
",",
"process_list",
",",
"ignore_dependencies",
",",
"auto_dependency",
")",
":",
"logger",
".",
"debug",
"(",
"\"=============================\"",
")",
"logger",
".",
"debug",
"(",
"\"Building pipeline connections\"",
")",
"... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
test | NextflowGenerator._get_process_names | Returns the input/output process names and output process directives
Parameters
----------
con : dict
Dictionary with the connection information between two processes.
Returns
-------
input_name : str
Name of the input process
output_name... | flowcraft/generator/engine.py | def _get_process_names(self, con, pid):
"""Returns the input/output process names and output process directives
Parameters
----------
con : dict
Dictionary with the connection information between two processes.
Returns
-------
input_name : str
... | def _get_process_names(self, con, pid):
"""Returns the input/output process names and output process directives
Parameters
----------
con : dict
Dictionary with the connection information between two processes.
Returns
-------
input_name : str
... | [
"Returns",
"the",
"input",
"/",
"output",
"process",
"names",
"and",
"output",
"process",
"directives"
] | assemblerflow/flowcraft | python | https://github.com/assemblerflow/flowcraft/blob/fc3f4bddded1efc76006600016dc71a06dd908c0/flowcraft/generator/engine.py#L374-L406 | [
"def",
"_get_process_names",
"(",
"self",
",",
"con",
",",
"pid",
")",
":",
"try",
":",
"_p_in_name",
"=",
"con",
"[",
"\"input\"",
"]",
"[",
"\"process\"",
"]",
"p_in_name",
",",
"_",
"=",
"self",
".",
"_parse_process_name",
"(",
"_p_in_name",
")",
"log... | fc3f4bddded1efc76006600016dc71a06dd908c0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.