Skip to content

Commit

Permalink
Reorganize version listing
Browse files Browse the repository at this point in the history
This is to make it clear that these version come from e.g. the
nf-core/demultiplex pipeline and not the seqreports pipeline.
  • Loading branch information
Aratz committed Mar 11, 2024
1 parent ebaa3df commit f6119fd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
26 changes: 20 additions & 6 deletions bin/get_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,26 @@ def get_info(self):
if flowcell_type:
results.update(flowcell_type)

return results

def get_demultiplexing_info(self):
try:
results["bcl2fastq version"] = self.get_bcl2fastq_version(self.runfolder)
return {
"Demultiplexing": {
"bcl2fastq": self.get_bcl2fastq_version(self.runfolder)
}
}
except FileNotFoundError:
pass

try:
results.update(self.get_software_version(self.runfolder))
return {
"Demultiplexing": self.get_software_version(self.runfolder)
}
except FileNotFoundError:
pass

return results
return {}


if __name__ == "__main__":
Expand All @@ -157,7 +166,7 @@ def get_info(self):
bcl2fastq_outdir = args.bcl2fastq_outdir

runfolder_info = RunfolderInfo(runfolder, bcl2fastq_outdir)
results = runfolder_info.get_info()
info = runfolder_info.get_info()

print(
"""
Expand All @@ -169,6 +178,11 @@ def get_info(self):
<dl class="dl-horizontal">
"""
)
for k, v in results.items():
print(" <dt>{}</dt><dd><samp>{}</samp></dd>".format(k, v))
for k, v in info.items():
print(f" <dt>{k}</dt><dd><samp>{v}</samp></dd>")

print(" <dt>Demultiplexing</dt>")
for software, version in runfolder_info.get_demultiplexing_info().items():
print(f" <dd>{software}: <samp>{version}</samp></dd>")

print(" </dl>")
2 changes: 1 addition & 1 deletion tests/unit_tests/test_get_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ def test_get_read_cycles(runfolder_info):

def test_get_info(runfolder_info):
results = runfolder_info.get_info()
assert len(results) == 15
assert len(results) == 9

0 comments on commit f6119fd

Please sign in to comment.