-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from Wedge-lab/feat/code-from-gel
env-template
- Loading branch information
Showing
32 changed files
with
167 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) | ||
|
||
USERNAME= # name of user, used to name temporary files (e.g. rsterling) | ||
PROJECT_CODE=re_gecip_cancer_colorectal # project code for submitting jobs (e.g. re_gecip_cancer_colorectal for CRC GeCIP) | ||
PROJECT_DIR=$parent_path/workdir # path to project directory - this is where log files are dumped so should be a location with plenty of space (e.g. /re_scratch/...) | ||
|
||
SAMPLE_LIST= # path to sample list file (e.g. sample_list_2021_06_29.tsv) | ||
REF_SIGNATURES_DIR= # path to folder containing reference signature tables (e.g. COSMIC_v3.3_CN_GRCh37.txt) | ||
SIG_DIR= # path to folder containing signature matrices (e.g. SigProfilerCNV48) | ||
GENE_LIST= # path to file containing list of genes (e.g. .../human-dna-repair-genes.tsv) | ||
|
||
FIGURE_DIR=$parent_path/figures # path to folder where figures will be saved (e.g. .../figures) | ||
DATA_DIR=$parent_path/data | ||
|
||
COMBINED_SIGS_DIR=$parent_path/data/combined_signatures # path to folder containing combined signature matrices (e.g. .../combined_sigs) | ||
|
||
CLINVAR_CADD_CMD=/re_gecip/shared_allGeCIPs/bkinnersley/CADD/CADD-scripts-master/CADD.sh # Path to script for running CADD | ||
|
||
# Mutation file paths | ||
GERMLINE_DIR=/gel_data_resources/main_programme/aggregation/aggregate_gVCF_strelka/aggV2/genomic_data | ||
AGGV2_SAMPLE_LIST=/gel_data_resources/main_programme/aggregation/aggregate_gVCF_strelka/aggV2/additional_data/sample_list/aggV2_sampleIds_mpv10_78195.tsv | ||
ONCOKB_DIR= # Folder containing oncokb annotations (e.g. .../OncoKB_annotation/output) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# Data stored in data directory | ||
data/ | ||
figures/ | ||
|
||
# renv packages | ||
renv/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,37 @@ | ||
import os | ||
import sys | ||
import pandas as pd, numpy as np, os | ||
|
||
import numpy as np | ||
import pandas as pd | ||
from dotenv import load_dotenv | ||
|
||
load_dotenv() | ||
AGGV2_SAMPLE_LIST = os.getenv('AGGV2_SAMPLE_LIST') | ||
|
||
if __name__=='__main__': | ||
AGGV2_SAMPLE_LIST = os.getenv("AGGV2_SAMPLE_LIST") | ||
|
||
if __name__ == "__main__": | ||
dir_output, sample_list_file = sys.argv[1:] | ||
|
||
# Get all samples from previous projects | ||
cancer_analysis_tables = [f"/re_gecip/shared_allGeCIPs/labkey_tables/{version}/cancer_analysis.tsv" | ||
for version in ['V8', 'V11/V11_reheadered', 'v14/v14_reheadered']] | ||
cancer_analysis_tables = [ | ||
f"/re_gecip/shared_allGeCIPs/labkey_tables/{version}/cancer_analysis.tsv" | ||
for version in ["V8", "V11/V11_reheadered", "v14/v14_reheadered"] | ||
] | ||
germline_platekey_list = np.array([]) | ||
for table in cancer_analysis_tables: | ||
germline_platekey_list = np.union1d(germline_platekey_list, | ||
np.array(pd.read_csv(table, sep="\t", usecols=["germline_sample_platekey"]))) | ||
germline_platekey_list = np.union1d( | ||
germline_platekey_list, | ||
np.array( | ||
pd.read_csv(table, sep="\t", usecols=["germline_sample_platekey"]) | ||
), | ||
) | ||
|
||
# Crossmatch with aggV2 | ||
aggv2_sample_list = np.array(pd.read_csv(AGGV2_SAMPLE_LIST, | ||
sep="\t", header=None)[0]) | ||
aggv2_sample_list = np.array( | ||
pd.read_csv(AGGV2_SAMPLE_LIST, sep="\t", header=None)[0] | ||
) | ||
|
||
germline_platekey_list = np.intersect1d(germline_platekey_list, aggv2_sample_list) | ||
print(f"{len(germline_platekey_list)} germline samples") | ||
pd.DataFrame(germline_platekey_list, columns=['germline_sample_platekey']).to_csv(f"{sample_list_file}", header=False, index=False) | ||
pd.DataFrame(germline_platekey_list, columns=["germline_sample_platekey"]).to_csv( | ||
f"{sample_list_file}", header=False, index=False | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,25 @@ | ||
import sys, os | ||
import pandas as pd, numpy as np | ||
import os | ||
import sys | ||
|
||
import numpy as np | ||
import pandas as pd | ||
|
||
if __name__=='__main__': | ||
|
||
if __name__ == "__main__": | ||
dir_output, sample_list_file = sys.argv[1:] | ||
|
||
# Get all samples from previous projects | ||
cancer_analysis_tables = [f"/re_gecip/shared_allGeCIPs/labkey_tables/{version}/cancer_analysis.tsv" | ||
for version in ['V8', 'V11/V11_reheadered', 'v14/v14_reheadered']] | ||
cancer_analysis_tables = [ | ||
f"/re_gecip/shared_allGeCIPs/labkey_tables/{version}/cancer_analysis.tsv" | ||
for version in ["V8", "V11/V11_reheadered", "v14/v14_reheadered"] | ||
] | ||
tumour_platekey_list = np.array([]) | ||
for table in cancer_analysis_tables: | ||
tumour_platekey_list = np.union1d(tumour_platekey_list, | ||
np.array(pd.read_csv(table, sep="\t", usecols=["tumour_sample_platekey"]))) | ||
tumour_platekey_list = np.union1d( | ||
tumour_platekey_list, | ||
np.array(pd.read_csv(table, sep="\t", usecols=["tumour_sample_platekey"])), | ||
) | ||
|
||
print(f"{len(tumour_platekey_list)} tumour_samples") | ||
pd.DataFrame(tumour_platekey_list, columns=['tumour_sample_platekey']).to_csv(f"{sample_list_file}", header=False, index=False) | ||
pd.DataFrame(tumour_platekey_list, columns=["tumour_sample_platekey"]).to_csv( | ||
f"{sample_list_file}", header=False, index=False | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.