Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ypriverol committed Aug 13, 2024
2 parents 1e24138 + e01551e commit bd7cd22
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "quantms-utils"
version = "0.0.2"
version = "0.0.7"
description = "Python scripts and helpers for the quantMS workflow"
authors = ["Yasset Perez-Riverol", "Dai Chengxin"]
packages = [
Expand Down
2 changes: 1 addition & 1 deletion quantmsutils/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.6"
__version__ = "0.0.7"
12 changes: 6 additions & 6 deletions quantmsutils/diann/diann2mztab.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def diann2mztab(
:param ctx: Click context
:param folder: DiannConvert specifies the folder where the required file resides. The folder contains
the DiaNN main report, protein matrix, precursor matrix, experimental design file, protein sequence
FASTA file, version file of DiaNN and ms_info TSVs
FASTA file, version file of DiaNN and ms_info parquet
:param exp_design: Experimental design file
:param dia_params: A list contains DIA parameters
:type dia_params: list
Expand Down Expand Up @@ -342,7 +342,7 @@ def fasta(self) -> os.PathLike:

@property
def ms_info(self) -> os.PathLike:
return self.find_first_file_with_suffix("ms_info.tsv")
return self.find_first_file_with_suffix("ms_info.parquet")

@property
def diann_version(self) -> str:
Expand Down Expand Up @@ -1064,7 +1064,7 @@ def mztab_psh(report, folder, database):
:type report: pandas.core.frame.DataFrame
:param folder: DiannConvert specifies the folder where the required file resides. The folder contains
the DiaNN main report, protein matrix, precursor matrix, experimental design file, protein sequence
FASTA file, version file of DiaNN and ms_info TSVs
FASTA file, version file of DiaNN and ms_info parquet
:type folder: str
:param database: Path to fasta file
:type database: str
Expand All @@ -1075,8 +1075,8 @@ def mztab_psh(report, folder, database):

def __find_info(directory, n):
# This line matches n="220101_myfile", folder="." to
# "myfolder/220101_myfile_ms_info.tsv"
files = list(Path(directory).rglob(f"{n}_ms_info.tsv"))
# "myfolder/220101_myfile_ms_info.parquet"
files = list(Path(directory).rglob(f"{n}_ms_info.parquet"))
# Check that it matches one and only one file
if not files:
raise ValueError(f"Could not find {n} info file in {directory}")
Expand All @@ -1094,7 +1094,7 @@ def __find_info(directory, n):
n = n[0]

file = __find_info(folder, n)
target = pd.read_csv(file, sep="\t")
target = pd.read_parquet(file)
group.sort_values(by="RT.Start", inplace=True)
target = target[["Retention_Time", "SpectrumID", "Exp_Mass_To_Charge"]]
target.columns = [
Expand Down

0 comments on commit bd7cd22

Please sign in to comment.