Skip to content

Commit

Permalink
Merge pull request #43 from bigbio/dev
Browse files Browse the repository at this point in the history
Technical replicate included
  • Loading branch information
ypriverol authored Apr 19, 2024
2 parents cb2aaaf + 7caea71 commit 60d4bb3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
quantmsio.egg-info
dist
build
.idea
.idea
data
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# quantms.io
[![Python application](https://github.com/bigbio/quantms.io/actions/workflows/python-app.yml/badge.svg?branch=dev)](https://github.com/bigbio/quantms.io/actions/workflows/python-app.yml)
[![Upload Python Package](https://github.com/bigbio/quantms.io/actions/workflows/python-publish.yml/badge.svg)](https://github.com/bigbio/quantms.io/actions/workflows/python-publish.yml)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/e71a662e8d4f483094576c1d8f8888c3)](https://app.codacy.com/gh/bigbio/quantms.io/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/e71a662e8d4f483094576c1d8f8888c3)](https://app.codacy.com/gh/bigbio/quantms.io/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_Coverage)
[![Documentation Status](https://readthedocs.org/projects/quantmsio/badge/?version=latest)](https://quantmsio.readthedocs.io/en/latest/?badge=latest)
[![PyPI version](https://badge.fury.io/py/quantmsio.svg)](https://badge.fury.io/py/quantmsio)

[quantms](https://docs.quantms.org) is a nf-core pipeline for the analysis of quantitative proteomics data. The pipeline is based on the [OpenMS](https://www.openms.de/) framework and [DIA-NN](https://github.com/vdemichev/DiaNN); and it is designed to analyze large scale experiments. the main outputs of quantms tools are the following:

Expand Down
17 changes: 15 additions & 2 deletions quantmsio/core/feature_in_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,7 @@ def _merge_sdrf_to_msstats_in(self, sdrf_path, msstats_in):
factor,
"comment[fraction identifier]",
"comment[label]",
"comment[technical replicate]",
]
]
sdrf["comment[data file]"] = sdrf["comment[data file]"].swifter.apply(lambda x: x.split(".")[0])
Expand All @@ -797,7 +798,7 @@ def _merge_sdrf_to_msstats_in(self, sdrf_path, msstats_in):
right_on=["comment[data file]", "comment[label]"],
how="left",
)
res.drop(["comment[data file]", "comment[label]"], axis=1, inplace=True)
res.drop(["comment[data file]", "comment[label]", "comment[technical replicate]"], axis=1, inplace=True)
res.rename(columns=self._map_tmt, inplace=True)
res.rename(columns={factor: "condition"}, inplace=True)
return res
Expand All @@ -809,7 +810,19 @@ def _merge_sdrf_to_msstats_in(self, sdrf_path, msstats_in):
right_on=["comment[data file]"],
how="left",
)
res.drop(["comment[data file]", "comment[label]"], axis=1, inplace=True)
samples = sdrf["source name"].unique()
mixed_map = dict(zip(samples, range(1, len(samples) + 1)))
res.loc[:, "Run"] = res[
["source name", "comment[technical replicate]", "comment[fraction identifier]"]
].swifter.apply(
lambda row: str(mixed_map[row["source name"]])
+ "-"
+ str(row["comment[technical replicate]"])
+ "-"
+ str(row["comment[fraction identifier]"]),
axis=1,
)
res.drop(["comment[data file]", "comment[label]", "comment[technical replicate]"], axis=1, inplace=True)
res.rename(columns=self._map_lfq, inplace=True)
res.rename(columns={factor: "condition"}, inplace=True)
return res
Expand Down

0 comments on commit 60d4bb3

Please sign in to comment.