Skip to content

Commit 9039193

Browse files
committed
NF_MAAgilent1ch: address #99
1 parent 22d59a6 commit 9039193

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

Microarray/Agilent_1-channel/Workflow_Documentation/NF_MAAgilent1ch/workflow_code/main.nf

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,11 @@ workflow {
9797
ch_software_versions = Channel.value(nf_version)
9898
AGILE1CH.out.versions | map{ it -> it.text } | mix(ch_software_versions) | set{ch_software_versions}
9999
VV_AGILE1CH.out.versions | map{ it -> it.text } | mix(ch_software_versions) | set{ch_software_versions}
100-
ch_software_versions | unique
101-
| collectFile(
102-
newLine: true,
103-
sort: true,
104-
cache: false
105-
)
106-
| GENERATE_SOFTWARE_TABLE
100+
101+
GENERATE_SOFTWARE_TABLE(
102+
ch_software_versions | unique | collectFile(newLine: true, sort: true, cache: false),
103+
ch_runsheet | splitCsv(header: true, quote: '"') | first | map{ row -> row['Array Data File Name'] }
104+
)
107105

108106
emit:
109107
meta = ch_meta

Microarray/Agilent_1-channel/Workflow_Documentation/NF_MAAgilent1ch/workflow_code/modules/GENERATE_SOFTWARE_TABLE/main.nf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ process GENERATE_SOFTWARE_TABLE {
55

66
input:
77
path("software_versions.yaml")
8+
val(filename)
89

910
output:
1011
path("software_versions_GLmicroarray.md")
1112

1213
script:
1314
"""
14-
SoftwareYamlToMarkdownTable.py software_versions.yaml
15+
SoftwareYamlToMarkdownTable.py software_versions.yaml \"$filename\"
1516
"""
1617
}

Microarray/Agilent_1-channel/Workflow_Documentation/NF_MAAgilent1ch/workflow_code/modules/GENERATE_SOFTWARE_TABLE/resources/usr/bin/SoftwareYamlToMarkdownTable.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,19 @@
4141

4242
@click.command()
4343
@click.argument("input_yaml", type=click.Path(exists=True))
44-
def yamlToMarkdown(input_yaml: Path):
44+
@click.argument("filename")
45+
def yamlToMarkdown(input_yaml: Path, filename: str):
4546
""" Using a software versions """
4647
with open(input_yaml, "r") as f:
4748
data = yaml.safe_load(f)
4849

4950
data.extend(ASSUMED_SOFTWARE)
5051
df = pd.DataFrame(data)
5152

53+
# If data files are not compressed, won't use R.utils to unzip them during processing
54+
if not filename.endswith('.gz'):
55+
AGILENT_SOFTWARE_DPPD.remove('r.utils')
56+
5257
# Filter to direct software used (i.e. exclude dependencies of the software)
5358
df = df.loc[df["name"].str.lower().isin(AGILENT_SOFTWARE_DPPD)]
5459

0 commit comments

Comments
 (0)