Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated simulation and tests to not use toy data at alll #227

Merged
merged 3 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion metrics/correlations/getBestCor.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
matrix = ""
alg = ""
for file in filelist:
[data,disease,mrna,to,prot,mat,cor] = os.path.basename(file).split('-')
[data,disease,mrna,to,prot,mat,frac,sample,rep,cor] = os.path.basename(file).split('-')
if mrna == prot:
tab = pandas.read_csv(file, sep='\t', header=None)
meanVal = tab[1].mean()
Expand Down
4 changes: 2 additions & 2 deletions metrics/data-sim/run-best-alg-by-sim.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ steps:
out:
[value]
get-mat:
run: https://raw.githubusercontent.com/PNNL-CompBio/proteomicsTumorDeconv/main/signature_matrices/get-signature-matrix.cwl
run: ../../signature_matrices/get-signature-matrix.cwl
in:
sigMatrixName: get-best-sim-mat/value
out:
Expand All @@ -52,7 +52,7 @@ steps:
out:
[value]
run-best-algs-by-sig:
run: https://raw.githubusercontent.com/PNNL-CompBio/proteomicsTumorDeconv/main/tumorDeconvAlgs/run-deconv.cwl
run: ../../tumorDeconvAlgs/run-deconv.cwl
in:
signature: get-mat/sigMatrix
alg: get-best-sim-alg/value
Expand Down
4 changes: 2 additions & 2 deletions metrics/data-sim/simul-data-comparison.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ steps:
run-all-algs-by-mrna:
run: call-deconv-on-sim.cwl
when: $(inputs.simType.trim() == 'mrna')
scatter: [protAlg,simulation,signature]
scatter: [protAlg,repNumber,signature]
scatterMethod: flat_crossproduct
in:
protAlg: prot-algorithms
simulation: mrna-perms
repNumber: mrna-perms
signature: rna-sigs
sample: sample
sampleType:
Expand Down
97 changes: 97 additions & 0 deletions metrics/data-sim/simul-data-files.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
#!/usr/bin/env cwltool
class: Workflow
label: simul-data-sampling
id: simul-data-sampling
cwlVersion: v1.2

requirements:
- class: SubworkflowFeatureRequirement
- class: MultipleInputFeatureRequirement
- class: ScatterFeatureRequirement
- class: StepInputExpressionRequirement
- class: InlineJavascriptRequirement

inputs:
num-reps:
type: int
default: 1
samples:
type: int[]
default: [20,40,60,80,100]
mrna-perms:
type: string[]
default: ['1','2','3','4','5','6','7','8','9','10','pbmc']
prot-perms:
type: string[]
default: ['1','2','3','4','5']
prot-algorithms:
type: string[]
default:
- mcpcounter
- xcell
- epic
- cibersort
rna-sigs:
type: string[]
default: ['LM22','PBMC']
prot-sigs:
type: string[]
default: ['LM7c','LM9']
simType:
type: string

outputs:
cell-cor-file:
type: File[]
outputSource: run-all-algs-by-prot
deconv:
type: File[]
outputSource: run-all-algs-by-prot
cellPred:
type: File[]
outputSource: run-all-algs-by-prot
deconvoluted:
type: File[]
outputSource: run-all-algs-by-prot
matrix:
type: File[]
outputSource: run-all-algs-by-prot


steps:
run-all-algs-by-mrna:
run: call-deconv-on-sim.cwl
when: $(inputs.simType.trim() == 'mrna')
scatter: [protAlg,permutation,signature,samples]
scatterMethod: flat_crossproduct
in:
protAlg: prot-algorithms
permutation: mrna-perms
signature: rna-sigs
sample: samples
num-reps: num-reps
sampleType:
valueFrom: 'normal'
dataType:
valueFrom: 'prot'
simType: simType
out:
[cell-cor-file, deconv, cellPred, deconvoluted, matrix]
run-all-algs-by-prot:
run: call-deconv-on-sim.cwl
when: $(inputs.simType.trim() == 'prot')
scatter: [protAlg,permutation,signature,samples]
scatterMethod: flat_crossproduct
in:
protAlg: prot-algorithms
permutation: prot-perms
sample: samples
num-reps: num-reps
signature: prot-sigs
sampleType:
valueFrom: 'normal'
dataType:
valueFrom: 'prot'
simType: simType
out:
[cell-cor-file,deconv, cellPred, deconvoluted, matrix]
4 changes: 2 additions & 2 deletions metrics/mrna-prot/best-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ prot-algorithms:

protFile:
class: File
path: ../../toy_data/TOY_log2ratio_protein_abundance_withNA.tsv
path: ../../toy_data/ov-all-prot-reduced.tsv

rnaFile:
class: File
path: ../../toy_data/TOY_rna_expression_imputed.tsv
path: ../../toy_data/ov-all-mrna-reduced.tsv
cancerType: test
tissueType: test
Loading
Loading