Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial commit for i2nca #777

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
6bf5537
wrappers for QCs
Jul 2, 2024
cf5fe8f
switched to vsc
Aug 29, 2024
9b34662
changed to collection
Aug 29, 2024
6454886
new tool for test
Aug 30, 2024
8a970da
updated to composite
Aug 30, 2024
71d8764
upped
Aug 30, 2024
501d554
removed withespaces
Aug 30, 2024
122295b
added composite output in analog to mel
Aug 30, 2024
2134bb4
updated output name
Aug 30, 2024
3ec0105
putput as coll
Aug 30, 2024
eee0802
testcomm
Aug 30, 2024
66eb323
added prof2cent
Aug 30, 2024
6703aa9
added cp2cc
Aug 30, 2024
bd74e73
updated the name
Aug 30, 2024
5788a9a
add
Aug 30, 2024
e6b4062
updated joiner
Aug 30, 2024
5299f31
started tests and help section in pp2cp
Sep 1, 2024
1aa7a33
renamed non-working xmls to invlaid name
Sep 1, 2024
fb25ae5
linting passed for pp
Sep 1, 2024
45b7f53
updating the help docs
Sep 2, 2024
c67e6e3
updated file joiner
Sep 2, 2024
f126f2e
updated all tools expt splitter
Sep 2, 2024
fbe324c
file cutter updated, results are not yet found by the exprot function
Sep 2, 2024
bbd281c
file_cutter wildcard
Sep 2, 2024
ca45499
Started tests
Sep 3, 2024
3de8e9f
file splitter valid for 2 hardcoded outputs
Sep 4, 2024
24bddc2
updtaed splitter
Sep 4, 2024
f52715c
updated tests
Sep 4, 2024
91d4c23
upped requriements
Oct 11, 2024
8bada6b
added tests to calibrant_qc
Oct 14, 2024
67b0ab4
region QC tests added
Oct 14, 2024
5abc7d9
updates test sections
Oct 14, 2024
b5a8014
added missing backslashes
Oct 14, 2024
215cfb7
init for the publish-branch of i2nca
Oct 14, 2024
20169f4
added the file test
cKNUSPeR Oct 14, 2024
7451faa
added the test files
cKNUSPeR Oct 14, 2024
698682f
readied for first try of push
cKNUSPeR Oct 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions pythonProject/main.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file really needed?

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This is a sample Python script.

# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.


def print_hi(name):
# Use a breakpoint in the code line below to debug your script.
print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint.


# Press the green button in the gutter to run the script.
if __name__ == '__main__':
print_hi('PyCharm')

# See PyCharm help at https://www.jetbrains.com/help/pycharm/
10 changes: 10 additions & 0 deletions tools/i2nca/.shed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: i2nca
owner: galaxyp
categories:
- Proteomics
- Imaging
description: i2nca is a preprocessing software for MSI data in imzML format.
long_description: |
i2nca (msI INteractive Conversion and quality Assesment) is designed to utilize the imzml parsing capabilities of m2aia and provides internal file conversions within this file type.
It can also perform multi-file operations and generate quality reports on imzML files.
homepage_url: https://github.com/cKNUSPeR/i2nca
99 changes: 99 additions & 0 deletions tools/i2nca/i2nca_agnostic_qc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<tool id="i2nca_agnostic_qc" name="i2nca Agnostic QC Report " version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@">

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use the Galaxy Language Server and reformat those tools, so that indentation matches etc ...

<description>
Create agnostic quality control reports for any kind of .imzML file.
Different metrics will be visualized as a pdf report.
</description>

<macros>
<import>macros.xml</import>
</macros>

<requirements>
<container type="docker">biocontainers/i2nca:0.3.12_cv1</container>
</requirements>

<command detect_errors="exit_code"><![CDATA[
cp "${infile.extra_files_path}/imzml" indata.imzML &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use single quotes everywhere

cp "${infile.extra_files_path}/ibd" indata.ibd &&
i2nca_agnostic_qc 'indata.imzML' './data'
]]></command>

<inputs>
<param name="infile" type="data" format="imzml" label="MSI data" help="Load the .imzml file on which the QC should be performed"/>
</inputs>

<outputs>
<data name="AgnosticQC" label="Agnostic QC report on ${on_string}" from_work_dir="data_agnostic_QC.pdf" format="pdf" />
</outputs>

<tests>
<!-- Test 1: QC on pp-->
<test>
<expand macro="pp_infile"/>
<output name="AgnosticQC" file="Agnostic_QC_Report_PP.pdf" compare="sim_size"/>
</test>

<!-- Test 2: QC on cc-->
<test>
<expand macro="cc_infile"/>
<output name="AgnosticQC" file="Agnostic_QC_Report_CC.pdf" compare="sim_size"/>
</test>

<!-- Test 3: QC on cp-->
<test>
<expand macro="cp_infile"/>
<output name="AgnosticQC" file="Agnostic_QC_Report_CP.pdf" compare="sim_size"/>
</test>

<!-- Test 4: QC on pc-->
<test>
<expand macro="pc_infile"/>
<output name="AgnosticQC" file="Agnostic_QC_Report_PC.pdf" compare="sim_size"/>
</test>

<!-- Test 45: QC on jpc-->
<test>
<expand macro="jpc_infile"/>
<output name="AgnosticQC" file="Agnostic_QC_Report_jPC.pdf" compare="sim_size"/>
</test>
</tests>
<help><![CDATA[
@I2NCA_DESCRIPTION@

This tool performs a quality control report generation on any imzml file.
In the report, different metrics will be visualized. This report doesn't require any input other that a dataset.
cool, with docker help

**Input data**


@MSIDATA_INPUT_DESCRIPTION@

]]></help>
<citations>
<citation type="bibtex">
@misc{githubi2nca,
author = {Jannik Witte},
title = {i2nca},
publisher = {GitHub},
journal = {Github repository},
url = {https://github.com/cKNUSPeR/i2nca}
}
</citation>
<citation type="bibtex">
@article{10.1093/gigascience/giab049,
author = {Cordes, Jonas and Enzlein, Thomas and Marsching, Christian and Hinze, Marven and Engelhardt, Sandy and Hopf, Carsten and Wolf, Ivo},
title = "{M2aia—Interactive, fast, and memory-efficient analysis of 2D and 3D multi-modal mass spectrometry imaging data}",
journal = {GigaScience},
volume = {10},
number = {7},
year = {2021},
month = {07},
issn = {2047-217X},
doi = {10.1093/gigascience/giab049},
url = {https://doi.org/10.1093/gigascience/giab049}
}
</citation>
Comment on lines +84 to +97
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<citation type="bibtex">
@article{10.1093/gigascience/giab049,
author = {Cordes, Jonas and Enzlein, Thomas and Marsching, Christian and Hinze, Marven and Engelhardt, Sandy and Hopf, Carsten and Wolf, Ivo},
title = "{M2aia—Interactive, fast, and memory-efficient analysis of 2D and 3D multi-modal mass spectrometry imaging data}",
journal = {GigaScience},
volume = {10},
number = {7},
year = {2021},
month = {07},
issn = {2047-217X},
doi = {10.1093/gigascience/giab049},
url = {https://doi.org/10.1093/gigascience/giab049}
}
</citation>
<citation type="doi">10.1093/gigascience/giab049</citation>

Use the force Luke!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not putting the citations into the macro and not repeat yourself?

</citations>
</tool>
135 changes: 135 additions & 0 deletions tools/i2nca/i2nca_calibrant_qc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
<tool id="i2nca_calibrant_qc" name="i2nca Calibrant QC Report" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@">

<description>
Create a Calibrant Quality control reports for any kind of .imzML file.
Supply a csv file with Signals to visualize them and their accuracies
Different metrics will be visualized as a pdf report.
</description>

<macros>
<import>macros.xml</import>
</macros>

<requirements>
<container type="docker">biocontainers/i2nca:0.3.12_cv1</container>
</requirements>
Comment on lines +13 to +15
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not moving this to a macro?



<command detect_errors="exit_code"><![CDATA[
cp "${infile.extra_files_path}/imzml" indata.imzML &&
cp "${infile.extra_files_path}/ibd" indata.ibd &&
'i2nca_calibrant_qc' 'indata.imzML' './data' '$csv_annotation' --ppm '$ppm' --sample_size '$subsample'
]]></command>

<inputs>
<param name="infile" type="data" format="imzml" label="MSI data" help="Load the imzML file (as Composite) on which the QC should be performed"/>
<param name="csv_annotation" label="Input csv file with signal annotation" type="data" format="csv" help="Load an .csv file for theoretical signals on which the QC should be performed.
Please use ';' as delimiter. The columns with the signals must be named 'name' and the respecive thoeretical m/z value must be named 'mz'" />
<param name="ppm" value="50" type="integer" label="ppm range (plusminus)" help="Cutoff on accuracy in ppm.
Determines the interval around the theoretical signal that is still considered in the report."/>
<param name="subsample" value="0.05" type="float" label="Subsample Percentage" help="Subset percentage of the file that is used in the raw data overview."/>
</inputs>


<outputs>
<data name="CalibrantQC" label="Calibrant QC report on ${on_string}" from_work_dir="data_calibrant_QC.pdf" format="pdf" />
</outputs>


<tests>
<!-- Test 1: QC on pp-->
<test>
<expand macro="pp_infile"/>
<param name="csv_annotation" value="calibrant.csv" ftype="csv"/>
<param name="ppm" value="50" />
<param name="subsample" value="1.0"/>
<output name="CalibrantQC" file="Calibrant_QC_Report_PP.pdf" compare="sim_size"/>
</test>

<!-- Test 2: QC on cc-->
<test>
<expand macro="cc_infile"/>
<param name="csv_annotation" value="calibrant.csv" ftype="csv"/>
<param name="ppm" value="50" />
<param name="subsample" value="1.0"/>
<output name="CalibrantQC" file="Calibrant_QC_Report_CC.pdf" compare="sim_size"/>
</test>

<!-- Test 3: QC on cp-->
<test>
<expand macro="cp_infile"/>
<param name="csv_annotation" value="calibrant.csv" ftype="csv"/>
<param name="ppm" value="50" />
<param name="subsample" value="1.0"/>
<output name="CalibrantQC" file="Calibrant_QC_Report_CP.pdf" compare="sim_size"/>
</test>

<!-- Test 4: QC on pc-->
<test>
<expand macro="pc_infile"/>
<param name="csv_annotation" value="calibrant.csv" ftype="csv"/>
<param name="ppm" value="50" />
<param name="subsample" value="1.0"/>
<output name="CalibrantQC" file="Calibrant_QC_Report_PC.pdf" compare="sim_size"/>
</test>

<!-- Test 45: QC on jpc-->
<test>
<expand macro="jpc_infile"/>
<param name="csv_annotation" value="calibrant.csv" ftype="csv"/>
<param name="ppm" value="50" />
<param name="subsample" value="1.0"/>
<output name="CalibrantQC" file="Calibrant_QC_Report_jPC.pdf" compare="sim_size"/>
</test>
</tests>


<help><![CDATA[
@I2NCA_DESCRIPTION@

This tool performs a quality control report generation on any imzml file.
In the report, different metrics will be visualized. This report doesn't require any input other that a dataset.

**Input data**


@MSIDATA_INPUT_DESCRIPTION@

Signal annotation: Please provide a list of m/z values of interest as csv file with ";" delimiter:
- The column with a unique identifier for each mass of interest must be called "name".
- The m/z value of interest must be provided as "mz".
- The annotation file may contain any additional columns.

ppm range: Provide the half-interval around the m/z values of interest where peaks are still considered part of the signal.

subsample percentage: Set the percentage of pixels that are utilized for visualization. Changing this number helps adjust the readability of some graphs in the report.



]]></help>
<citations>
<citation type="bibtex">
@misc{githubi2nca,
author = {Jannik Witte},
title = {i2nca},
publisher = {GitHub},
journal = {Github repository},
url = {https://github.com/cKNUSPeR/i2nca}
}
</citation>
<citation type="bibtex">
@article{10.1093/gigascience/giab049,
author = {Cordes, Jonas and Enzlein, Thomas and Marsching, Christian and Hinze, Marven and Engelhardt, Sandy and Hopf, Carsten and Wolf, Ivo},
title = "{M2aia—Interactive, fast, and memory-efficient analysis of 2D and 3D multi-modal mass spectrometry imaging data}",
journal = {GigaScience},
volume = {10},
number = {7},
year = {2021},
month = {07},
issn = {2047-217X},
doi = {10.1093/gigascience/giab049},
url = {https://doi.org/10.1093/gigascience/giab049}
}
</citation>
</citations>
</tool>
Loading
Loading