@@ -1225,7 +1225,7 @@ def maxquant_convert(
1225
1225
root .appendChild (secondPeptide )
1226
1226
1227
1227
matchBetweenRuns_node = doc .createElement ("matchBetweenRuns" )
1228
- if "enable_match_between_runs" in file2params :
1228
+ if "enable_match_between_runs" in file2params and len ( file2params [ "enable_match_between_runs" ]) > 0 :
1229
1229
first = list (file2params ["enable_match_between_runs" ].values ())[0 ]
1230
1230
matchBetweenRuns = True
1231
1231
matchBetweenRuns_node .appendChild (doc .createTextNode (first ))
@@ -1350,7 +1350,7 @@ def maxquant_convert(
1350
1350
root .appendChild (intensityPredictionsFile )
1351
1351
1352
1352
minPepLen = doc .createElement ("minPepLen" )
1353
- if "min_peptide_length" in file2params :
1353
+ if "min_peptide_length" in file2params and len ( file2params [ "min_peptide_length" ]) > 0 : :
1354
1354
tparam = file2params ["min_peptide_length" ]
1355
1355
first = list (tparam .values ())[0 ]
1356
1356
minPepLen .appendChild (doc .createTextNode (first ))
@@ -1368,7 +1368,7 @@ def maxquant_convert(
1368
1368
root .appendChild (psmFdrCrosslink )
1369
1369
1370
1370
peptideFdr = doc .createElement ("peptideFdr" )
1371
- if "ident_fdr_peptide" in file2params :
1371
+ if "ident_fdr_peptide" in file2params and len ( file2params [ "ident_fdr_peptide" ]) > 0 : :
1372
1372
tparam = file2params ["ident_fdr_peptide" ]
1373
1373
first = list (tparam .values ())[0 ]
1374
1374
warning_message = "overwriting peptide FDR using the value in the sdrf file"
@@ -1382,7 +1382,7 @@ def maxquant_convert(
1382
1382
root .appendChild (peptideFdr )
1383
1383
1384
1384
proteinFdr = doc .createElement ("proteinFdr" )
1385
- if "ident_fdr_protein" in file2params :
1385
+ if "ident_fdr_protein" in file2params and len ( file2params [ "ident_fdr_protein" ]) > 0 : :
1386
1386
tparam = file2params ["ident_fdr_protein" ]
1387
1387
first = list (tparam .values ())[0 ]
1388
1388
warning_message = "overwriting protein FDR using the value in the sdrf file"
@@ -1396,7 +1396,7 @@ def maxquant_convert(
1396
1396
root .appendChild (proteinFdr )
1397
1397
1398
1398
siteFdr = doc .createElement ("siteFdr" )
1399
- if "ident_fdr_psm" in file2params :
1399
+ if "ident_fdr_psm" in file2params and len ( file2params [ "ident_fdr_psm" ]) > 0 : :
1400
1400
tparam = file2params ["ident_fdr_psm" ]
1401
1401
first = list (tparam .values ())[0 ]
1402
1402
warning_message = "overwriting PSM FDR using the value in the sdrf file"
@@ -1422,7 +1422,7 @@ def maxquant_convert(
1422
1422
root .appendChild (useNormRatiosForOccupancy )
1423
1423
1424
1424
minPeptides = doc .createElement ("minPeptides" )
1425
- if "min_num_peptides" in file2params :
1425
+ if "min_num_peptides" in file2params and len ( file2params [ "min_num_peptides" ]) > 0 : :
1426
1426
tparam = file2params ["min_num_peptides" ]
1427
1427
first = list (tparam .values ())[0 ]
1428
1428
minPeptides .appendChild (doc .createTextNode (first ))
@@ -1504,7 +1504,7 @@ def maxquant_convert(
1504
1504
root .appendChild (compositionPrediction )
1505
1505
1506
1506
quantMode = doc .createElement ("quantMode" )
1507
- if "protein_inference" in file2params :
1507
+ if "protein_inference" in file2params and len ( file2params [ "protein_inference" ]) > 0 : :
1508
1508
tparam = file2params ["protein_inference" ]
1509
1509
first = list (tparam .values ())[0 ]
1510
1510
if first == "unique" :
0 commit comments