Skip to content

Commit

Permalink
Merge pull request #214 from PNNL-CompBio/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
sgosline committed Aug 17, 2023
2 parents 434fc3f + 2a9546d commit 1a4b308
Show file tree
Hide file tree
Showing 25 changed files with 5,404 additions and 183 deletions.
33 changes: 3 additions & 30 deletions .github/workflows/alg-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ defaults:
working-directory: ./
on:
push:
branches:
- "*"
paths:
- 'tumorDeconvAlgs/*'


jobs:
build-and-push-tools:
Expand All @@ -22,34 +23,6 @@ jobs:
with:
username: ${{ secrets.DOCKER }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push correlations
uses: docker/build-push-action@v4
with:
context: metrics/correlations
platforms: linux/amd64,linux/arm64/v8
push: true
tags: tumordeconv/correlation:latest
- name: Build and push distance
uses: docker/build-push-action@v4
with:
context: metrics/distance
platforms: linux/amd64,linux/arm64/v8
push: true
tags: tumordeconv/comparison:latest
- name: Build and push figures
uses: docker/build-push-action@v4
with:
context: metrics/figures
platforms: linux/amd64,linux/arm64/v8
push: true
tags: tumordeconv/figures:latest
- name: Build and push immune subtype
uses: docker/build-push-action@v4
with:
context: metrics/imm-subtypes
platforms: linux/amd64,linux/arm64/v8
push: true
tags: tumordeconv/imm-subtypes:latest
- name: Build and push cibersort
uses: docker/build-push-action@v4
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker-build-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ defaults:
working-directory: ./
on:
push:
branches:
- "*"
paths:
- "mRNAData/*"

jobs:
build-and-push-deconv-metrics:
build-and-push mrna:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/metrics-docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Docker-build-metrics
defaults:
run:
working-directory: ./
on:
push:
paths:
- 'metrics/*'

jobs:
build-and-push-tools:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push correlations
uses: docker/build-push-action@v4
with:
context: metrics/correlations
platforms: linux/amd64,linux/arm64
push: true
tags: tumordeconv/correlation:latest
- name: Build and push distance
uses: docker/build-push-action@v4
with:
context: metrics/distance
platforms: linux/amd64,linux/arm64
push: true
tags: tumordeconv/comparison:latest
- name: Build and push figures
uses: docker/build-push-action@v4
with:
context: metrics/figures
platforms: linux/amd64,linux/arm64
push: true
tags: tumordeconv/figures:latest
- name: Build and push immune subtype
uses: docker/build-push-action@v4
with:
context: metrics/imm-subtypes
platforms: linux/amd64,linux/arm64
push: true
tags: tumordeconv/imm-subtypes:latest

9 changes: 7 additions & 2 deletions mRNAData/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
from amancevice/pandas
from amancevice/pandas:1.4.0-slim
#RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
#RUN apt update gcc fortran python-dev build-base wget freetype-dev libpng-dev openblas-dev py-numpy
#RUN ln -s /usr/include/locale.h /usr/include/xlocale.h
RUN pip install --no-cache-dir numpy scipy matplotlib

RUN pip install --upgrade cptac
COPY mRNADataSetsCLI.py /bin/
RUN chmod 777 /bin/mRNADataSetsCLI.py
COPY getAllDatasets.py /bin/
RUN python /bin/getAllDatasets.py
#RUN python /bin/getAllDatasets.py
#VOLUME ['/tmp']
WORKDIR ['/tmp']
7 changes: 6 additions & 1 deletion metrics/correlations/deconv-corrXcelltypes-cwl-tool.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,13 @@ inputs:
default: "spearman"
signature:
type: string
sampleVal:
type: int
default: 100
sampleType:
type: string
sampleRep:
type: int

outputs:
corr:
Expand All @@ -47,7 +52,7 @@ outputs:
outputEval: |
${
var mat = inputs.signature
var name = inputs.sampleType + '-' + inputs.cancerType + '-' + inputs.mrnaAlg + '-to-' + inputs.protAlg +'-'+ mat + '-cellTypecorr.tsv'
var name = inputs.sampleType + '-' + inputs.cancerType + '-' + inputs.mrnaAlg + '-to-' + inputs.protAlg +'-'+ mat + '-' + inputs.sampleVal + '-sample-' + inputs.sampleRep +'-cellTypecorr.tsv'
self[0].basename = name;
return self[0]
}
50 changes: 28 additions & 22 deletions metrics/data-sim/call-deconv-on-sim.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,39 @@ requirements:
- class: StepInputExpressionRequirement

inputs:
signature:
signature: ##name of matrix to sample from
type: string
protAlg:
protAlg: ##algorithm to run
type: string
permutation:
simulation: ## permutation to test
type: string
default: '1'
dataType:
dataType: ##mRNA or protein data
type: string
default: 'prot'
simType:
simType: ##data simulated from mrna or protein
type: string
default: 'prot'
sample: ##how much of the permuted sample do we test
type: int
default: 100
sampleRep: ##
type: int
default: 1

outputs:
matrix:
type: File
outputSource: get-sim-data/matrix
cellPred:
type: File
outputSource: get-sim-data/cellType
deconvoluted:
type: File
outputSource: deconv-prot/deconvoluted
deconv:
type: File
outputSource: match-prot-to-sig/updated-deconv
# mat-dist-file:
# matrix:
# type: File
# outputSource: get-sim-data/matrix
# cellPred:
# type: File
# outputSource: get-sim-data/cellType
# deconvoluted:
# type: File
# outputSource: deconv-prot/deconvoluted
# deconv:
# type: File
# outputSource: matrix-distance/dist
# outputSource: match-prot-to-sig/updated-deconv
cell-cor-file:
type: File
outputSource: celltype-cor/corr
Expand All @@ -50,12 +53,13 @@ steps:
run: ../../signature_matrices/get-signature-matrix.cwl
in:
sigMatrixName: signature
subsample: sample
out:
[sigMatrix]
get-sim-data:
run: ../../simulatedData/sim-data-tool.cwl
in:
repNumber: permutation
simNumber: simulation
simType: simType
out:
[matrix,cellType]
Expand All @@ -77,12 +81,14 @@ steps:
celltype-cor:
run: ../correlations/deconv-corrXcelltypes-cwl-tool.cwl
in:
cancerType: permutation
cancerType: simulation
mrnaAlg:
valueFrom: "cellFraction"
protAlg: protAlg
signature: signature
sampleVal: sample
sampleType: simType
sampleRep: sampleRep
proteomics:
source: match-prot-to-sig/updated-deconv
transcriptomics:
Expand All @@ -93,7 +99,7 @@ steps:
# in:
# matrixA: match-prot-to-sig/updated-deconv
# matrixB: match-prot-to-sig/updated-cell-matrix
# cancerType: permutation
# cancerType: simulation
# aAlg: protAlg
# bAlg:
# valueFrom: "cellFraction"
Expand Down
9 changes: 7 additions & 2 deletions metrics/data-sim/simul-data-comparison.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ inputs:
default: ['LM7c','LM9']
simType:
type: string
sample:
type: int
default: 100

outputs:
cell-cor-tab:
Expand All @@ -52,13 +55,14 @@ steps:
protAlg: prot-algorithms
permutation: mrna-perms
signature: rna-sigs
sample: sample
sampleType:
valueFrom: 'normal'
dataType:
valueFrom: 'prot'
simType: simType
out:
[cell-cor-file, deconv, cellPred, deconvoluted, matrix]
[cell-cor-file]
run-all-algs-by-prot:
run: call-deconv-on-sim.cwl
when: $(inputs.simType.trim() == 'prot')
Expand All @@ -68,13 +72,14 @@ steps:
protAlg: prot-algorithms
permutation: prot-perms
signature: prot-sigs
sample: sample
sampleType:
valueFrom: 'normal'
dataType:
valueFrom: 'prot'
simType: simType
out:
[cell-cor-file,deconv, cellPred, deconvoluted, matrix]
[cell-cor-file]
get-celltype-cors:
run: ../figures/plot-figs.cwl
in:
Expand Down
Loading

0 comments on commit 1a4b308

Please sign in to comment.