Skip to content

Commit c5fae6c

Browse files
adding paths to fda thresholds and adding condition to remove extra row from itb review files if it exist
1 parent 5b31655 commit c5fae6c

File tree

2 files changed

+33
-20
lines changed

2 files changed

+33
-20
lines changed

scripts/fda_quality_thresholds.csv

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
Criteria,Threshold for pass/failure
2-
TOTAL_READS (tumor DNA),>250M
3-
TOTAL_READS (normal DNA),>100M
4-
TOTAL_READS (tumor RNA),>200M
5-
PCT_PF_READS_ALIGNED (tumor/normal DNA),>95%
6-
PCT_PF_READS_ALIGNED (tumor RNA),>85%
7-
PCT_USABLE_BASES_ON_TARGET  (tumor/normal DNA),>20%
8-
PCT_EXC_OFF_TARGET  (tumor/normal DNA),<60%
9-
PERCENT_DUPLICATION  (tumor/normal DNA),<40%
10-
MEAN_TARGET_COVERAGE (tumor DNA),>250x
11-
MEAN_TARGET_COVERAGE (normal DNA),>100x
12-
PCT_TARGET_BASES_20X  (tumor/normal DNA),>95%
13-
PCT_READS_ALIGNED_IN_PAIRS  (tumor/normal DNA),>95%
14-
MEAN_INSERT_SIZE (tumor/normal DNA),125 - 300bp
15-
PF_MISMATCH_RATE_1 (tumor/normal DNA),<0.75%
16-
PF_MISMATCH_RATE_2 (tumor/normal DNA),<1.00%
17-
Genotype Concordance (tumor/normal DNA),>95%
18-
Contamination Estimate (tumor/normal DNA),<7.5%
2+
TOTAL_READS (tumor DNA),>250M,/qc/fda_metrics/unaligned_sample/sample_table1.csv
3+
TOTAL_READS (normal DNA),>100M,/qc/fda_metrics/unaligned_sample/sample_table1.csv
4+
TOTAL_READS (tumor RNA),>200M,/qc/fda_metrics/unaligned_sample/sample_table1.csv
5+
PCT_PF_READS_ALIGNED (tumor/normal DNA),>95%,/qc/fda_metrics/aligned_sample/aligned_sample_table2.csv
6+
PCT_PF_READS_ALIGNED (tumor RNA),>85%,/qc/fda_metrics/aligned_sample/aligned_sample_table2.csv
7+
PCT_USABLE_BASES_ON_TARGET  (tumor/normal DNA),>20%,/qc/fda_metrics/aligned_sample/aligned_sample_table2.csv
8+
PCT_EXC_OFF_TARGET  (tumor/normal DNA),<60%,/qc/fda_metrics/aligned_sample/aligned_sample_table2.csv
9+
PERCENT_DUPLICATION  (tumor/normal DNA),<40%,/qc/fda_metrics/aligned_sample/aligned_sample_table2.csv
10+
MEAN_TARGET_COVERAGE (tumor DNA),>250x,/qc/fda_metrics/aligned_sample/aligned_sample_table2.csv
11+
MEAN_TARGET_COVERAGE (normal DNA),>100x,/qc/fda_metrics/aligned_sample/aligned_sample_table2.csv
12+
PCT_TARGET_BASES_20X  (tumor/normal DNA),>95%,/qc/fda_metrics/aligned_sample/aligned_sample_table2.csv
13+
PCT_READS_ALIGNED_IN_PAIRS  (tumor/normal DNA),>95%,/qc/fda_metrics/aligned_sample/aligned_sample_table2.csv
14+
MEAN_INSERT_SIZE (tumor/normal DNA),125 - 300bp,/qc/fda_metrics/aligned_sample/aligned_sample_table2.csv
15+
PF_MISMATCH_RATE_1 (tumor/normal DNA),<0.75%,/qc/fda_metrics/aligned_sample/aligned_sample_table2.csv
16+
PF_MISMATCH_RATE_2 (tumor/normal DNA),<1.00%,/qc/fda_metrics/aligned_sample/aligned_sample_table2.csv
17+
Genotype Concordance (tumor/normal DNA),>95%,/qc/concordance/concordance.somalier.pairs.tsv
18+
Contamination Estimate (tumor/normal DNA),<7.5%,/qc/sample/normal.VerifyBamId.selfSM

scripts/generate_reviews_files.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,23 @@ def main():
8383
reviewed_candidates = pd.read_excel(args.a)
8484

8585

86-
reviewed_candidates.columns = reviewed_candidates.iloc[0]
87-
reviewed_candidates = reviewed_candidates[1:] # there is a extra row before the col name row
88-
reviewed_candidates = reviewed_candidates.reset_index(drop=True) # Reset the index of the dataframe
86+
#reviewed_candidates.columns = reviewed_candidates.iloc[0]
87+
#reviewed_candidates = reviewed_candidates[1:] # there is a extra row before the col name row
88+
#reviewed_candidates = reviewed_candidates.reset_index(drop=True) # Reset the index of the dataframe
8989

90+
# Check if the first row is blank
91+
if reviewed_candidates.iloc[0].isnull().all():
92+
# Remove the first row if it's blank
93+
reviewed_candidates = reviewed_candidates[1:]
94+
# If there are still rows in the DataFrame, proceed with the operations
95+
if not reviewed_candidates.empty:
96+
# Set the columns to the values of the first row
97+
reviewed_candidates.columns = reviewed_candidates.iloc[0]
98+
# Skip the first row (which is now the column names)
99+
reviewed_candidates = reviewed_candidates[1:]
100+
# Reset the index of the DataFrame
101+
reviewed_candidates = reviewed_candidates.reset_index(drop=True)
102+
90103
reviewed_candidates = reviewed_candidates[reviewed_candidates.Evaluation != "Pending"]
91104
reviewed_candidates = reviewed_candidates[reviewed_candidates.Evaluation != "Reject"]
92105

0 commit comments

Comments
 (0)