Skip to content

Commit

Permalink
Merge pull request #124 from daichengxin/dev
Browse files Browse the repository at this point in the history
fixed error
  • Loading branch information
jpfeuffer authored Mar 16, 2022
2 parents 00cf5c9 + 53e20e3 commit 448982c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 26 deletions.
1 change: 0 additions & 1 deletion assets/PXD026600.sdrf.tsv
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Source Name Characteristics[organism] Characteristics[organism part] Characteristics[age] Characteristics[strain] Characteristics[developmental stage] Characteristics[cell line] Characteristics[cell type] Characteristics[sex] Characteristics[disease] characteristics[mass] characteristics[spiked compound] Characteristics[biological replicate] Material Type assay name technology type comment[data file] comment[file uri] comment[technical replicate] comment[fraction identifier] comment[proteomics data acquisition method] comment[label] comment[instrument] comment[modification parameters] comment[modification parameters] comment[cleavage agent details] comment[dissociation method] comment[collision energy] comment[precursor mass tolerance] comment[fragment mass tolerance] factor value[spiked compound]
Sample 1 Escherichia coli K-12 whole plant not available K12 not available not applicable not available not available not available 1 ug CT=Mixture;CN=UPS1;QY=0.1 fmol 1 whole organism run 1 proteomic profiling by mass spectrometry RD139_Narrow_UPS1_0_1fmol_inj1.raw ftp://massive.ucsd.edu/MSV000087597/raw/RD139_Raw_files_DIA_Narrow/RD139_Narrow_UPS1_0_1fmol_inj1.raw 1 1 NT=Data-Independent Acquisition;AC=NCIT:C161786 AC=MS:1002038;NT=label free sample NT=Orbitrap Fusion;AC=MS:1002416 NT=Oxidation;MT=Variable;TA=M;AC=Unimod:35 NT=Carbamidomethyl;TA=C;MT=fixed;AC=UNIMOD:4 AC=MS:1001313;NT=Trypsin NT=HCD;AC=PRIDE:0000590 35% CE 10 ppm 20 mmu CT=Mixture;CN=UPS1;QY=0.1 fmol
Sample 1 Escherichia coli K-12 whole plant not available K12 not available not applicable not available not available not available 1 ug CT=Mixture;CN=UPS1;QY=0.1 fmol 1 whole organism run 2 proteomic profiling by mass spectrometry RD139_Narrow_UPS1_0_1fmol_inj2.raw ftp://massive.ucsd.edu/MSV000087597/raw/RD139_Raw_files_DIA_Narrow/RD139_Narrow_UPS1_0_1fmol_inj2.raw 2 1 NT=Data-Independent Acquisition;AC=NCIT:C161786 AC=MS:1002038;NT=label free sample NT=Orbitrap Fusion;AC=MS:1002416 NT=Oxidation;MT=Variable;TA=M;AC=Unimod:35 NT=Carbamidomethyl;TA=C;MT=fixed;AC=UNIMOD:4 AC=MS:1001313;NT=Trypsin NT=HCD;AC=PRIDE:0000590 35% CE 10 ppm 20 mmu CT=Mixture;CN=UPS1;QY=0.1 fmol
Sample 1 Escherichia coli K-12 whole plant not available K12 not available not applicable not available not available not available 1 ug CT=Mixture;CN=UPS1;QY=0.1 fmol 1 whole organism run 3 proteomic profiling by mass spectrometry RD139_Narrow_UPS1_0_1fmol_inj3.raw ftp://massive.ucsd.edu/MSV000087597/raw/RD139_Raw_files_DIA_Narrow/RD139_Narrow_UPS1_0_1fmol_inj3.raw 3 1 NT=Data-Independent Acquisition;AC=NCIT:C161786 AC=MS:1002038;NT=label free sample NT=Orbitrap Fusion;AC=MS:1002416 NT=Oxidation;MT=Variable;TA=M;AC=Unimod:35 NT=Carbamidomethyl;TA=C;MT=fixed;AC=UNIMOD:4 AC=MS:1001313;NT=Trypsin NT=HCD;AC=PRIDE:0000590 35% CE 10 ppm 20 mmu CT=Mixture;CN=UPS1;QY=0.1 fmol
52 changes: 27 additions & 25 deletions bin/prepare_diann_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,31 +44,33 @@ def convert_mod(unimod_csv, fix_mod, var_mod):
var_ptm = []
fix_ptm = []
unimod = pd.read_csv(unimod_csv, header=0, sep=",")
for mod in fix_mod.split(","):
diann_mod = unimod[unimod['name'] == mod.split(" ")[0]]["params"].values[0]
site = re.findall(pattern, " ".join(mod.split(" ")[1:]))[0]
if site == "Protein N-term":
site = "*n"
elif site == "N-term":
site = "n"

if "TMT" in diann_mod or "Label" in diann_mod or "iTRAQ" in diann_mod or "mTRAQ" in diann_mod:
fix_ptm.append(diann_mod + "," + site + "," + "label")
else:
fix_ptm.append(diann_mod + "," + site)

for mod in var_mod.split(","):
diann_mod = unimod[unimod['name'] == mod.split(" ")[0]]["params"].values[0]
site = re.findall(pattern, " ".join(mod.split(" ")[1:]))[0]
if site == "Protein N-term":
site = "*n"
elif site == "N-term":
site = "n"

if "TMT" in diann_mod or "Label" in diann_mod or "iTRAQ" in diann_mod or "mTRAQ" in diann_mod:
var_ptm.append(diann_mod + "," + site + "," + "label")
else:
var_ptm.append(diann_mod + "," + site)
if fix_mod != "":
for mod in fix_mod.split(","):
diann_mod = unimod[unimod['name'] == mod.split(" ")[0]]["params"].values[0]
site = re.findall(pattern, " ".join(mod.split(" ")[1:]))[0]
if site == "Protein N-term":
site = "*n"
elif site == "N-term":
site = "n"

if "TMT" in diann_mod or "Label" in diann_mod or "iTRAQ" in diann_mod or "mTRAQ" in diann_mod:
fix_ptm.append(diann_mod + "," + site + "," + "label")
else:
fix_ptm.append(diann_mod + "," + site)

if var_mod != "":
for mod in var_mod.split(","):
diann_mod = unimod[unimod['name'] == mod.split(" ")[0]]["params"].values[0]
site = re.findall(pattern, " ".join(mod.split(" ")[1:]))[0]
if site == "Protein N-term":
site = "*n"
elif site == "N-term":
site = "n"

if "TMT" in diann_mod or "Label" in diann_mod or "iTRAQ" in diann_mod or "mTRAQ" in diann_mod:
var_ptm.append(diann_mod + "," + site + "," + "label")
else:
var_ptm.append(diann_mod + "," + site)

return fix_ptm, var_ptm

Expand Down
2 changes: 2 additions & 0 deletions modules/local/thermorawfileparser/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ process THERMORAWFILEPARSER {
'https://depot.galaxyproject.org/singularity/thermorawfileparser:1.3.4--ha8f3691_0' :
'quay.io/biocontainers/thermorawfileparser:1.3.4--ha8f3691_0' }"

stageInMode {task.attempt == 1 ? 'link' : (task.attempt == 2 ? 'symlink' : 'copy')}

input:
tuple val(meta), path(rawfile)

Expand Down

0 comments on commit 448982c

Please sign in to comment.