Genetics-informed pathogenic spatial mapping
Project description
GPS
How to use:
STEP-1: Find the latent representations
root=/storage/yangjianLab/songliyang/SpatialData/Data/Brain/Human/Nature_Neuroscience_2021/processed/h5ad
ls ${root} | while read file
do
name=($(echo ${file} | cut -d'.' -f 1))
command="python3 /storage/yangjianLab/songliyang/SpatialData/spatial_ldsc_v1/Find_Latent_Representations.py \
--spe_path ${root} \
--spe_name ${file} \
--annotation layer_guess \
--type count \
--spe_out /storage/yangjianLab/songliyang/SpatialData/Data/Brain/Human/Nature_Neuroscience_2021/annotation/${name}/h5ad"
qsubshcom_gpu "$command" 1 50G GAT_${name} 2:00:00 "--qos gpu-huge -queue=v100,a40-tmp,a40-quad"
done
STEP-2: Find marker genes
root=/storage/yangjianLab/songliyang/SpatialData/Data/Brain/Human/Nature_Neuroscience_2021/processed/h5ad
ls ${root} | grep h5ad | while read file
do
name=($(echo ${file} | cut -d'.' -f 1))
command="python3 /storage/yangjianLab/songliyang/SpatialData/spatial_ldsc_v1/Latent_to_Gene_V2.py \
--latent_representation latent_GVAE \
--spe_path /storage/yangjianLab/songliyang/SpatialData/Data/Brain/Human/Nature_Neuroscience_2021/annotation/${name}/h5ad \
--spe_name ${name}_add_latent.h5ad \
--num_processes 4 \
--type count \
--annotation layer_guess \
--num_neighbour 51 \
--spe_out /storage/yangjianLab/songliyang/SpatialData/Data/Brain/Human/Nature_Neuroscience_2021/annotation/${name}/gene_markers"
qsubshcom "$command" 4 50G mkS_${name} 24:00:00 "--qos huge -queue=intel-sc3,amd-ep2,amd-ep2-short"
done
STEP-3: markers to SNP annotations
root=/storage/yangjianLab/songliyang/SpatialData/Data/Brain/Human/Nature_Neuroscience_2021/processed/h5ad
ls ${root} | grep h5ad | while read file
do
name=($(echo ${file} | cut -d'.' -f 1))
command="python3 /storage/yangjianLab/songliyang/SpatialData/spatial_ldsc_v1/Make_Annotations_V2.py \
--mk_score_file /storage/yangjianLab/songliyang/SpatialData/Data/Brain/Human/Nature_Neuroscience_2021/annotation/${name}/gene_markers/${name}_rank.feather \
--gtf_file /storage/yangjianLab/songliyang/ReferenceGenome/GRCh37/gencode.v39lift37.annotation.gtf \
--bfile_root /storage/yangjianLab/sharedata/LDSC_resource/1000G_EUR_Phase3_plink/1000G.EUR.QC \
--annot_root /storage/yangjianLab/songliyang/SpatialData/Data/Brain/Human/Nature_Neuroscience_2021/annotation/${name}/snp_annotation \
--keep_snp /storage/yangjianLab/sharedata/LDSC_resource/hapmap3_snps/hm \
--annot_name ${name} \
--const_max_size 500 \
--chr {TASK_ID} \
--ld_wind_cm 1"
qsubshcom "$command" 5 60G annS_${name} 24:00:00 "-array=1-22 --qos huge -queue=intel-sc3,amd-ep2,amd-ep2-short"
done
STEP-4: LDSC analysis
gwas_root=/storage/yangjianLab/songliyang/GWAS_trait/LDSC
gwas_trait=/storage/yangjianLab/songliyang/GWAS_trait/GWAS_Public_Use_MaxPower.csv
root=/storage/yangjianLab/songliyang/SpatialData/Data/Brain/Human/Nature_Neuroscience_2021/processed/h5ad
ls ${root} | grep h5ad | while read file
do
spe_name=($(echo ${file} | awk -F "." '{print $1}'))
ld_pth=/storage/yangjianLab/songliyang/SpatialData/Data/Brain/Human/Nature_Neuroscience_2021/annotation/${spe_name}/snp_annotation
out_pth=/storage/yangjianLab/songliyang/SpatialData/Data/Brain/Human/Nature_Neuroscience_2021/ldsc_enrichment/${spe_name}
awk -F"," 'NR>1 {print $1}' ${gwas_trait} | awk -F ".txt" '{print $1}' | while read gwas_file
do
out_file=${out_pth}/${spe_name}_${gwas_file}.gz
command="python3 /storage/yangjianLab/songliyang/SpatialData/spatial_ldsc_v1/Spatial_LDSC.py \
--h2 ${gwas_root}/${gwas_file}.sumstats.gz \
--w_file /storage/yangjianLab/sharedata/LDSC_resource/LDSC_SEG_ldscores/weights_hm3_no_hla/weights. \
--data_name ${spe_name} \
--num_processes 3 \
--ld_file ${ld_pth} \
--out_file ${out_pth}"
qsubshcom "$command" 3 100G h2_${spe_name}_${gwas_file} 24:00:00 "--qos huge -queue=intel-sc3,amd-ep2,amd-ep2-short"
done
done
STEP-5: Do Cauchy combination test for pre-defined annotation
root=/storage/yangjianLab/songliyang/SpatialData/Data/Brain/Human/Nature_Neuroscience_2021/processed/h5ad
ldsc_root=/storage/yangjianLab/songliyang/SpatialData/Data/Brain/Human/Nature_Neuroscience_2021/ldsc_enrichment/
ls ${root} | grep h5ad | while read file
do
spe_name=($(echo ${file} | awk -F "." '{print $1}'))
ls ${ldsc_root}/${spe_name} | grep '.gz' | grep -v 'Cauchy' | while read trait
do
command="python3 /storage/yangjianLab/songliyang/SpatialData/spatial_ldsc_v1/Cauchy_combination.py \
--ldsc_path ${ldsc_root}/${spe_name} \
--ldsc_name ${trait} \
--spe_path /storage/yangjianLab/songliyang/SpatialData/Data/Brain/Human/Nature_Neuroscience_2021/annotation/${spe_name}/h5ad/ \
--spe_name ${spe_name}_add_latent.h5ad \
--annotation layer_guess"
qsubshcom "$command" 1 20G cahchy_${trait} 2:00:00 "--qos huge -queue=intel-sc3,amd-ep2,amd-ep2-short"
# $command
done
done
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gps_mapping-1.0.1.tar.gz
(67.5 kB
view details)
Built Distribution
File details
Details for the file gps_mapping-1.0.1.tar.gz
.
File metadata
- Download URL: gps_mapping-1.0.1.tar.gz
- Upload date:
- Size: 67.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd0745556a5d0518aec9759899f1d3c7f0176c0a7d532cd532bd05239ce70988 |
|
MD5 | 133627371043c8576bd1d90d0777f8b5 |
|
BLAKE2b-256 | 2a7fe8ae8229cc76eeb57cd66073b1a7bb7d60d8f1e22e655e8931e3336dfd23 |
File details
Details for the file gps_mapping-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: gps_mapping-1.0.1-py3-none-any.whl
- Upload date:
- Size: 74.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4093ebf750a351af84d9c7a3dd16860768d5f9677324b8c772bdfd3f271347d2 |
|
MD5 | 167cdf403ead4d3f7c6e88787992a99c |
|
BLAKE2b-256 | 4f924258f56e42b93496417765fe7bf1c95b9847c4fbb14d67dd8994958b16d8 |