Skip to content

Commit c4f0db8

Browse files
committed
got single dataset build to work with script
1 parent 51adfeb commit c4f0db8

8 files changed

Lines changed: 24 additions & 1734 deletions

File tree

build.out

Lines changed: 0 additions & 1721 deletions
This file was deleted.

build/docker/Dockerfile.mpnstPDX

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ ENV MPLCONFIGDIR=/app/tmp/matplotlib
3939
RUN mkdir -p /app/tmp/matplotlib
4040

4141
# Add necessary files to the container
42-
ADD build/mpnstPDX/requirements.txt .
43-
ADD build/mpnstPDX/requirements.r .
44-
ADD build/mpnstPDX/* ./
42+
ADD build/mpnstpdx/requirements.txt .
43+
ADD build/mpnstpdx/requirements.r .
44+
ADD build/mpnstpdx/* ./
4545
ADD build/utils/* ./
4646

4747
# installing python libraries

build/docker/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ services:
4444
HTTPS_PROXY: ${HTTPS_PROXY}
4545
platform: linux/amd64
4646
image: mpnst:latest
47+
4748
mpnstpdx:
4849
build:
4950
context: ../../

build/mpnst/build_drugs.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
1-
Rscript 02_get_drug_data.R $SYNAPSE_AUTH_TOKEN $1 /tmp/mpnst_drugs.tsv
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
trap 'echo "Error on or near line $LINENO while executing: $BASH_COMMAND"; exit 1' ERR
5+
6+
echo "Running 02_get_drug_data.R with /tmp/mpnst_drugs.tsv and $1."
7+
Rscript 02_get_drug_data.R /tmp/mpnst_drugs.tsv $1
8+
9+
echo "Running build_drug_desc.py."
210
/opt/venv/bin/python3 build_drug_desc.py --drugtable /tmp/mpnst_drugs.tsv --desctable /tmp/mpnst_drug_descriptors.tsv.gz

build/mpnstPDX/01_mpnst_get_omics.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ synLogin(authToken = PAT)
3030
# Read the sample mapping CSV and genes.csv
3131
samples_df <- fread(patients)|>
3232
dplyr::select(improve_sample_id,common_name,model_type)|>
33-
distinct()#"mpnst/synapse_NF-MPNSTPDX_samples.csv")
33+
distinct()#"mpnst/synapse_NF-MPNSTpdx_samples.csv")
3434

3535
pdx_samps<-subset(samples_df,model_type=='patient derived xenograft')
3636
tumor_samps<-subset(samples_df,model_type=='tumor')
@@ -41,7 +41,7 @@ manifest<-synapser::synTableQuery("select * from syn53503360")$asDataFrame()|>
4141
dplyr::rename(common_name='Sample')
4242

4343

44-
##for now we only have tumor and PDX data
44+
##for now we only have tumor and pdx data
4545
##they each get their own sample identifier
4646
pdx_data<-manifest|>dplyr::select(common_name,starts_with("PDX"))|>
4747
left_join(pdx_samps)|>
@@ -83,7 +83,7 @@ proteomics<-do.call('rbind',lapply(setdiff(pdx_data$Proteomics,c('',NA,"NA")),fu
8383
# }
8484
}))
8585

86-
fwrite(proteomics,'/tmp/mpnstPDX_proteomics.csv.gz')
86+
fwrite(proteomics,'/tmp/mpnstpdx_proteomics.csv.gz')
8787

8888

8989
#### FIRST WE GET RNASeq Data
@@ -108,7 +108,7 @@ rnaseq<-do.call('rbind',lapply(setdiff(pdx_data$RNASeq,c(NA,"NA")),function(x){
108108
# }
109109
}))
110110

111-
fwrite(rnaseq,'/tmp/mpnstPDX_transcriptomics.csv.gz')
111+
fwrite(rnaseq,'/tmp/mpnstpdx_transcriptomics.csv.gz')
112112

113113

114114

@@ -136,7 +136,7 @@ wes<-do.call(rbind,lapply(setdiff(pdx_data$`Mutations`,c(NA,"NA")),function(x){
136136
# }
137137
}))
138138

139-
fwrite(wes,'/tmp/mpnstPDX_mutations.csv.gz')
139+
fwrite(wes,'/tmp/mpnstpdx_mutations.csv.gz')
140140

141141

142142
print(paste("getting CNV"))
@@ -190,6 +190,6 @@ cnv<-do.call(rbind,lapply(setdiff(pdx_data$CopyNumber,c(NA,"NA")),function(x){
190190
# }
191191
}))
192192

193-
fwrite(cnv,'/tmp/mpnstPDX_copy_number.csv.gz')
193+
fwrite(cnv,'/tmp/mpnstpdx_copy_number.csv.gz')
194194

195195
##TODO: get proteomics!!!

build/mpnstPDX/03_get_drug_response_data.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ pdx_data<-rbind(old_data,new_data)
162162
fwrite(pdx_data,'/tmp/curve_data.tsv',sep='\t')
163163

164164
##TODO: create new curve fitting script in python
165-
pycmd = '/opt/venv/bin/python calc_pdx_metrics.py --input /tmp/curve_data.tsv --outprefix /tmp/mpnstPDX'
165+
pycmd = '/opt/venv/bin/python calc_pdx_metrics.py --input /tmp/curve_data.tsv --outprefix /tmp/mpnstpdx'
166166
print('running curve fitting')
167167
#system(pycmd)
168168

build/mpnstPDX/build_samples.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cp $1 /tmp/mpnstPDX_samples.csv
1+
cp $1 /tmp/mpnstpdx_samples.csv

build/mpnstPDX/requirements.r

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ install.packages("data.table")
88
install.packages("synapser", repos = c("http://ran.synapse.org", "https://cloud.r-project.org"))
99
install.packages("R.utils")
1010
install.packages("stringr")
11-
install.packages("tidyr")
11+
install.packages("tidyr")
12+
install.packages('readr')
13+
install.packages("readxl")

0 commit comments

Comments
 (0)