Skip to content

Instantly share code, notes, and snippets.

@adiamb
Last active May 18, 2017 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adiamb/2a18b4a9b89a1452256f6ba176b485c9 to your computer and use it in GitHub Desktop.
Save adiamb/2a18b4a9b89a1452256f6ba176b485c9 to your computer and use it in GitHub Desktop.
Plates86_87_GWAS_bash_April21
!/bin/sh
#
# set the name of the job
#$ -N hcrt_AA
#
# set the maximum memory usage (per slot)
#$ -l h_vmem=2G
#
# set the maximum run time
#$ -l h_rt=00:05:00
#
# send mail when job ends or aborts
#$ -m ea
#
# specify an email address
#$ -M ambati@stanford.edu
#
# check for errors in the job submission options
#$ -w e
module add plink
##first Plink command as soon as we recevie the genome studio processed files
plink --file Plate86and87PMRAv1 --no-fid --no-pheno --no-parents --no-sex --out P86_87 --threads 8
###second is to make bed file and apply filters and QC
plink --bfile HCRT_batch2_AA --maf 0.01 --mind 0.05/0.95 --geno 0.05/0.95 --hwe 0.000001 --make-bed --out HCRT_batch2_AA_2
#########make genome file after applying QCs
plink --bfile HCRT_batch2_AA_2 --genome --out HCRT_batch2_AA_2
#############make MDS plots from genome file
plink --bfile HCRT_batch2_AA_2 --read-genome HCRT_batch2_AA_2.genome --cluster --mds-plot 9 --out HCRT_batch2_AA_3 ##u can change the number pcas by changing -plot option
##get a list of duplicate snps
plink --bfile HCRT_batch2_AA_2 --list-duplicate-vars suppress-first --out tmp ##lists out a file called tmp.dupvar
##remove all duplicate SNPs and remake the bed file
plink --bfile HCRT_batch2_AA_2 --exclude tmp.dupvar --make-bed --out HCRT_batch2_AA_3
#plink --noweb --maf 0.05 --bfile T1503_Mignot_Subjects_v2 --pheno hcrt.pheno.cov --pheno-name HCRT_vals --covar hcrt.pheno.cov --covar-name age_at_LP Gender CDR_updated --linear --adjust --out hc$
#plink --noweb --maf 0.05 --bfile T1503_Mignot_Subjects_v2 --pheno hcrt.pheno.cov --pheno-name inno_Ab42 --covar hcrt.pheno.cov --covar-name age_at_LP Gender CDR_updated --linear --adjust --out in$
#plink --meta-analysis hcrt.mixed.plate77to85.CHRS.updated.MAF0.05.AA.rs /srv/gsfs0/projects/mignot/hcrtgwas/AL_HCRT_GWAS_ASSoc_Freq_AA.assoc + qt --out test4
#plink --file Plate86and87PMRAv1 --no-fid --no-pheno --no-parents --no-sex --out HCRT_batch2_AA
#plink --maf 0.05 --bfile HCRT_batch2_AA --pheno batch2_AA.cov --pheno-name HCRT --covar batch2_AA.cov --covar-name Age gender BMI --linear --adjust --out hcrt_batch2_AA_0.05maf
#plink --bfile HCRT_batch2_AA --maf 0.01 --mind 0.05/0.95 --geno 0.05/0.95 --hwe 0.000001 --make-bed --out HCRT_batch2_AA_2
#plink --bfile HCRT_batch2_AA_2 --genome --out HCRT_batch2_AA_2
#plink --bfile HCRT_batch2_AA_2 --read-genome HCRT_batch2_AA_2.genome --cluster --mds-plot 9 --out HCRT_batch2_AA_3
#plink --bfile HCRT_batch2_AA_2 --chr 23 --make-bed --out HCRT_batch2.chr23
##remove duplicate snps
#plink --bfile HCRT_batch2_AA_2 --list-duplicate-vars suppress-first --out tmp
#plink --bfile HCRT_batch2_AA_2 --exclude tmp.dupvar --make-bed --out HCRT_batch2_AA_3
##############prephasing for imputation for loop not parallel job submission (maybe inefficent and slow !)
for i in `seq 1 22`
do
/srv/gsfs0/projects/mignot/METANarco/LastReplication/bin/shapeit --input-bed /srv/gsfs0/projects/mignot/hcrtgwas/hcrt_batch2/HCRT_batch2.chr"$i".bed /srv/gsfs0/projects/mignot/hcrtgwas/hcrt_batch2/HCRT_batch2.chr"$i".bim /srv/gsfs0/projects/mignot/hcrtgwas/hcrt_batch2/HCRT_batch2.chr"$i".fam \
-M /srv/gsfs0/projects/mignot/Axiom_550606/GENOME/genetic_map_chr"$i"_combined_b37.txt \
-O /srv/gsfs0/projects/mignot/hcrtgwas/Plate86to87.CHR"$i"
-T 25
done
##prephasing parallel job submission for prephasing
#!/bin/sh
for i in `seq 1 22`
do
command=`echo /srv/gsfs0/projects/mignot/METANarco/LastReplication/bin/shapeit --input-bed /srv/gsfs0/projects/mignot/hcrtgwas/hcrt_batch2/HCRT_batch2.chr"$i".bed /srv/gsfs0/projects/mignot/hcrtgwas/hcrt_batch2/HCRT_batch2.chr"$i".bim /srv/gsfs0/projects/mignot/hcrtgwas/hcrt_batch2/HCRT_batch2.chr"$i".fam \
-M /srv/gsfs0/projects/mignot/Axiom_550606/GENOME/genetic_map_chr"$i"_combined_b37.txt \
-O /srv/gsfs0/projects/mignot/hcrtgwas/Plate86to87.CHR"$i" \
-T 8`
touch tmpchr prephasing.$i.sh
chmod 755 prephasing.$i.sh
echo \#\!/bin/bash >prephasing.$i.sh
echo \#$ -N chr"$i"_prephasing >>prephasing.$i.sh
echo \#$ -l h_vmem=5G >>prephasing.$i.sh
echo \#$ -l h_rt=12:00:00 >>prephasing.$i.sh
echo \#$ -w e >>prephasing.$i.sh
echo \#$ -pe shm 8 >>prephasing.$i.sh
echo $command >> prephasing.$i.sh
qsub -V -cwd prephasing.$i.sh
done
######################imputation after prephasing############################################################ impute each chromosome separately, each chromosome will have to be submiited individually to cluster
##save this following file as ./imputechr.sh and chmod 777
#command at the bash $ ./imputechr.sh 1 (#change based on chromosome number) 250 (change based on the chromsome size -### edit this line to update per chr size in Mb (https://genome.ucsc.edu/goldenpath/help/hg19.chrom.sizes))
#!/bin/sh
for i in `seq 0 $2`
do
interval=`echo $i'e6 '$(($i +1))'e6'`
command=`echo impute2 -known_haps_g /srv/gsfs0/projects/mignot/hcrtgwas/Plate86to87.CHR"$1".haps -h /srv/gsfs0/projects/mignot/Axiom_550606/GENOME/ALL.chr"$1".integrated_phase1_v3.20101123.snps_indels_svs.genotypes.nomono.haplotypes.gz -l /srv/gsfs0/projects/mignot/Axiom_550606/GENOME/ALL.chr"$1".integrated_phase1_v3.20101123.snps_indels_svs.genotypes.nomono.legend.gz -m /srv/gsfs0/projects/mignot/Axiom_550606/GENOME/genetic_map_chr"$1"_combined_b37.txt -int "$interval" -Ne 20000 -o CHR"$1".output.Plate86to87merged."$i"`
touch tmpchr"$1".$i.sh
chmod 755 tmpchr"$1".$i.sh
echo \#\!/bin/bash >tmpchr"$1".$i.sh
echo \#$ -N i$i.chr"$1" >>tmpchr"$1".$i.sh
echo \#$ -l h_vmem=35g >>tmpchr"$1".$i.sh
echo \#$ -l h_rt=6:00:00 >>tmpchr"$1".$i.sh
#echo \#$ -pe shm 1 >>tmpchr"$1".$i.sh
echo \#$ -w e >>tmpchr"$1".$i.sh
echo "module add impute/2.3.2" >>tmpchr"$1".$i.sh
echo $command >> tmpchr"$1".$i.sh
qsub -V -cwd tmpchr"$1".$i.sh
#rm tmpchr"$1".$i.sh
done
#################merge each chromosome interval
#first move all of the *number (imputed files into a folder by mkdir) and then cat them with a loop
#!/bin/sh
#
# set the name of the job
#$ -N cat_imputeloop
#
# set the maximum memory usage (per slot)
#$ -l h_vmem=6G
#
# set the maximum run time
#$ -l h_rt=6:00:00
#
# send mail when job ends or aborts
#$ -m ea
#
# specify an email address
#$ -M ambati@stanford.edu
#
# check for errors in the job submission options
#$ -w e
#$ -pe shm 4
for i in $(seq 1 22)
do
cat CHR"$i".output.Plate86to87merged.* > CHR"$i".Plate86to87.impute2
done
#############cat all info files
for i in `seq 1 22`
do
tail -n+2 CHR"$i".output.Plate86to87merged.**_info | awk -v i="$i" '{print $1="", i, $0;}' | cat > chr"$i".p86to87.tempinfo
cat info_header chr"$i".p86to87.tempinfo > chr"$i".p86to87.info
rm chr"$i".p86to87.tempinfo
done
##remove second row containing aunnecessary row from cat loop
for i in `seq 1 22`
do
sed -e '2d' chr"$i".p86to87.info > chr"$i".p86to87QC.info
rm chr"$i".p86to87.info
done
rsync -av --progress ambati@scg4-dtn01.stanford.edu:/srv/gsfs0/projects/mignot/hcrtgwas/impute_extrafiles/chr{1..22}.p86to87QC.info /media/labcomp/HDD/GWASProjects/NarcolepsyGWASdata/imputeextras
#############Prepare Sample file for SNPtest####################################################################
#########################get missing proportions by plink ############################################################
#!/bin/sh
#module add plink
for i in `seq 1 22`
do
#sed "s/CHR18/CHR"$i"/g" hcrt.chr18.snptest.sh > hcrt.chr"$i".snptest.sh
plink --bfile HCRT_batch2_AA_3 --chr "$i" --missing --out Plate86to87.chr"$i".imiss
done
##mds file for snp test Get MDS COVs 1 -9 for the study from plink output
awk '{$1=$2=$3=""; print $0}' HCRT_batch2_AA_2mds.mds > Plate86to87.mds2 #print all columns except 123
##id file
awk '{print$1" "$2}' Plate86to87.CHR13.sample > IDs_plate86to87
#!/bin/sh
for i in `seq 1 22`
do
awk '{print $6}' Plate86to87.chr"$i".miss.imiss > P86_87_chr"$i"missing ##printout missing columns no 6 as sep file
tail -n+2 P86_87_chr"$i"missing > tmp #remove the header lines to make a tmp file
cat missing tmp > P86_87_chr"$i"missing.formatted ##add (missing and 0 to the missing proportion file) and make a new file .formatted
paste -d " " IDs_plate86to87 P86_87_chr"$i"missing.formatted hcrt_covs_feb6 Plate86to87.mds2 > CHR"$i".86to87.sample ### paste the missing .formatted file into the IDS, mds, hcrt_covs file from above to make a new sample file
tr -d $'\r'< CHR"$i".86to87.sample > CHR"$i".86to87.updated.sample
#sed -e "s/^M//" CHR"$i".77to85.sample > CHR"$i".77to85.updated.sample
done
###SNP-eQTL test job submission loop
#!/bin/sh
for i in `seq 1 22`
do
command=`echo snptest -data /srv/gsfs0/projects/mignot/hcrtgwas/CHR"$i".Plate86to87.impute2 /srv/gsfs0/projects/mignot/hcrtgwas/CHR"$i".86to87.updated.sample -method score -cov_names C1 C2 C3 C4 C5 C6 C7 C8 C9 -frequentist 1 -pheno HCRT -o hcrt.plate86to87updated.CHR"$i" -exclude_samples /srv/gsfs0/projects/mignot/hcrtgwas/CHR"$i".86to87.exclusion.sample`
touch tmpchr SNPtest.$i.sh
chmod 755 SNPtest.$i.sh
echo \#\!/bin/bash >SNPtest.$i.sh
echo \#$ -N chr"$i"_SNPtest >>SNPtest.$i.sh
echo \#$ -l h_vmem=5G >>SNPtest.$i.sh
echo \#$ -l h_rt=12:00:00 >>SNPtest.$i.sh
echo \#$ -w e >>SNPtest.$i.sh
echo "module add snptest/2.5-beta4" >>SNPtest.$i.sh
echo $command >> SNPtest.$i.sh
qsub -V -cwd SNPtest.$i.sh
done
/srv/gsfs0/projects/mignot/METANarco/LastReplication/CHR10.77to85.updated.sample
###after SNP test remove extra rows and add CHR number as first column
for i in `seq 1 22`
do
cat hcrt.plate86to87updated.CHR"$i" | awk -v i="$i" '{print $1="", i, $0;}' > hcrt.plate86to87.CHR"$i".updated
tail -n+13 hcrt.plate86to87.CHR"$i".updated > hcrt.plate86to87.CHR"$i".formatted
done
#############maf 0.05/0.99 filtering
for i in `seq 1 22`
do
awk '$19 >= 0.05 && $19 <=0.99 {print $0}' hcrt.plate86to87.CHR"$i".formatted > hcrt.plate86to87.CHR"$i".formatted_maf0.05
done
#######merge all HCRTSNPtest outputs for all chromosomes removing the header from each file
for i in `seq 1 22`
do
tail -n+2 hcrt.plate86to87.CHR"$i".formatted_maf0.05 > CHR"$i".temp
done
cat header_maf0.05 *.temp > hcrt.plate86to87.total.maf0.05
##printout the columns necessary to conduct metanalysis
awk '{print $1" "$2" "$4" "$5" "$6" "$21" "$23" "$24}' hcrt.plate86to87.total.maf0.05 > hcrt.plate86to87.totalmaf0.05.assoc
awk '{print $1" "$2" "$4" "$5" "$6" "$21" "$23" "$24}' hcrt.mixed.plate77to85.CHRs.updated.MAF0.05.rs > hcrt.plate77to85.totalmaf0.05.assoc
##########plink meta analysis
plink --meta-analysis hcrt.plate86to87.totalmaf0.05.assoc hcrt.plate77to85.totalmaf0.05.assoc Alz_hcrt_ADRC_maf0.05.assoc + qt --out hcrt_meta_feb9 --threads 8
##convert posterior probablities into values ranging from 0-2
for i in `seq 1 22`
do
cat CHR"$i".Plate86to87.impute2 | awk '{printf $1"\t"$2"\t"$3"\t"$4"\t"$5; for(i=6; i<NF; i+=3) {if($(i+0) == 0 && $(i+1) == 0 && $(i+2) == 0) printf "\tNA"; else printf "\t"$(i+0)*0+$(i+1)*1+$(i+2)*2}; printf "\n"}' > CHR"$i".dosages
done
##get chromosome positions and rsids from dosage files
for i in `seq 1 22`
do
awk '{print$1"\t"$2"\t"$3}' CHR"$i".dosages > CHR"$i".pos
p
done
#join all dosages files
cat *.dosages > Plate86to87total.dosages
##
ssh -X scg3-ln02
qlogin -l h_vmem=100G -l h_rt=6:00:00 -pe shm 8
module load r/3.3.1
rstudio
###
##extra scripts not used in the analysis
#for some impute2 files log file at the start so delete the first 63 lines and reformat
tail -n+63 CHR15.Plate86to87.impute2 > CHR15.Plate86to87_clean.impute2
tail -n+63 CHR21.Plate86to87.impute2 > CHR21.Plate86to87_clean.impute2
tail -n+63 CHR13.Plate86to87.impute2 > CHR13.Plate86to87_clean.impute2
tail -n+63 CHR14.Plate86to87.impute2 > CHR14.Plate86to87_clean.impute2
tail -n+489 CHR22.Plate86to87.impute2 > CHR22.Plate86to87_clean.impute2
##reapply SNPtest on these chrs that had log files on the top previosuly and cleaned by tail command
snptest_v2.5.2 -data /media/labcomp/HDD/GWASProjects/batch2_jan25/imputed_files/CHR15.Plate86to87_clean.impute2 CHR15.86to87.updated.sample -method score -cov_names C1 C2 C3 C4 C5 C6 C7 C8 C9 -frequentist 1 -pheno HCRT -o hcrt.plate86to87updated.CHR15 -exclude_samples CHR15.86to87.exclusion.sample
##local SNPtest
snptest_v2.5.2 -data /media/labcomp/HDD/GWASProjects/batch2_jan25/imputed_files/CHR20.Plate86to87.impute2 test_sample_CHR20.sample -method score -cov_names C1 C2 C3 C4 C5 C6 C7 C8 C9 -frequentist 1 -mpheno HCRT -o hcrt.plate86to87updated.CHR8
##search and replace columns
sed -e "s/^M//" CHR"$i".77to85.sample
###single pheno -SNP test script
module add snptest/2.5-beta4
snptest -data /srv/gsfs0/projects/mignot/hcrtgwas/CHR"$i".Plate86to87.impute2 /srv/gsfs0/projects/mignot/hcrtgwas/CHR"$i".86to87.updated.sample -method score -cov_names C1 C2 C3 C4 C5 C6 C7 C8 C9 -frequentist 1 -pheno HCRT -o hcrt.plate86to87updated.CHR"$i" -exclude_samples /srv/gsfs0/projects/mignot/hcrtgwas/CHR"$i".86to87.exclusion.sample
##gtool for converting into ped/map format from impute2
gtool -G --g /media/labcomp/HDD/GWASProjects/batch2_jan25/imputed_files/CHR19.Plate86to87.impute2 --chr 19 --s /media/labcomp/HDD/GWASProjects/batch2_jan25/imputed_files/Plate86to87.CHR19.sample --ped /media/labcomp/HDD/GWASProjects/batch2_jan25/imputed_files/Plate86to87.CHR19.ped --map /media/labcomp/HDD/GWASProjects/batch2_jan25/imputed_files/Plate86to87.CHR19.map
##make file and then make bed from impute 2
plink --file Plate86to87.CHR19 --out test_chr19
##add chromsome number after SNP test
cat hcrt.plate86to87.CHR"$i" | awk -v i="$i" '{print $1="", i, $0;}'
##old snp loop, go down to see a parallel job submission
#!/bin/sh
#
# set the name of the job
#$ -N hcrtSNP_test86to87
#
# set the maximum memory usage (per slot)
#$ -l h_vmem=4G
#
# set the maximum run time
#$ -l h_rt=168:00:00
#
# send mail when job ends or aborts
#$ -m ea
#
# specify an email address
#$ -M ambati@stanford.edu
#
# check for errors in the job submission options
#$ -w e
#$ -pe shm 8
for i in `seq 1 22`;do
module add snptest/2.5-beta4
snptest -data /srv/gsfs0/projects/mignot/hcrtgwas/CHR"$i".Plate86to87.impute2 /srv/gsfs0/projects/mignot/hcrtgwas/CHR"$i".86to87.updated.sample -method score -cov_names C1 C2 C3 C4 C5 C6 C7 C8 C9 -frequentist 1 -pheno HCRT -o hcrt.plate86to87updated.CHR"$i" -exclude_samples /srv/gsfs0/projects/mignot/hcrtgwas/CHR"$i".86to87.exclusion.sample
done
##looop test
for chr in $(seq 1 22); do
echo "chr"$chr
done
for chr in $(seq 1 22); do
echo "/srv/gsfs0/projects/mignot/Axiom_550606/GENOME/genetic_map_chr${chr}_combined_b37.txt"
echo "/srv/gsfs0/projects/mignot/METANarco/LastReplication/bin/shapeit --input-bed /srv/gsfs0/projects/mignot/hcrtgwas/hcrt_batch2/HCRT_batch2.chr$chr.bed /srv/gsfs0/projects/mignot/hcrtgwas/hcrt_batch2/HCRT_batch2.chr$chr.bim /srv/gsfs0/projects/mignot/hcrtgwas/hcrt_batch2/HCRT_batch2.chr$chr.fam"
echo "/srv/gsfs0/projects/mignot/hcrtgwas/Plate86to87.CHR${chr}"
done
##moving files from and to the cluster
scp ambati@scg4.stanford.edu:/srv/gsfs0/projects/mignot/hcrtgwas/hcrt_batch2/HCRT_batch2.chr* /home/labcomp/Documents/shapeittest
scp ambati@scg4.stanford.edu:/srv/gsfs0/projects/mignot/Axiom_550606/GENOME/* /home/labcomp/Documents/shapeittest
scp ambati@scg4.stanford.edu:/srv/gsfs0/projects/mignot/hcrtgwas/shapeit /media/labcomp/HDD/GWASProjects/GWAS_HCRTbatch2hap/
scp ambati@scg4.stanford.edu:/srv/gsfs0/projects/mignot/hcrtgwas/hcrt.plate86to87.* /media/labcomp/HDD/GWASProjects/batch2_jan25/HCRTSNPtest
/media/labcomp/HDD/GWASProjects/GWAS_HCRTbatch2hap/shapeit --input-bed /media/labcomp/HDD/GWASProjects/GWAS_HCRTbatch2hap/HCRT_batch2.chr1.bed /
/media/labcomp/HDD/GWASProjects/GWAS_HCRTbatch2hap/HCRT_batch2.chr1.bim /media/labcomp/HDD/GWASProjects/GWAS_HCRTbatch2hap/HCRT_batch2.chr1.fam \
-M /media/labcomp/HDD/GWASProjects/Build_37_regen/genetic_map_chr1_combined_b37.txt
-O /media/labcomp/HDD/GWASProjects/test.CHR1
/media/labcomp/HDD3/GWA
cp /media/labcomp/ELEMENTS/linux backup2/Documents/shapeittest/HCRT_batch2.chr* /media/labcomp/HDD/GWAS_HCRTbatch2hap/ ls
scp ambati@scg4.stanford.edu:/srv/gsfs0/projects/mignot/Axiom_550606/GENOME /media/labcomp/HDD/GWASProjects/GENOME/
scp ambati@scg4.stanford.edu:/srv/gsfs0/projects/mignot/hcrtgwas/*.haps /media/labcomp/HDD/GWASProjects/GENOME/
scp ambati@scg4.stanford.edu:/srv/gsfs0/projects/mignot/hcrtgwas/*.impute2 /media/labcomp/HDD/GWASProjects/batch2_jan25/imputed_files
scp ambati@scg4.stanford.edu:/srv/gsfs0/projects/mignot/hcrtgwas/*.sample /media/labcomp/HDD/GWASProjects/batch2_jan25/imputed_files
scp /media/labcomp/HDD/GWASProjects/batch2_jan25/hcrt_covs_feb6 ambati@scg4.stanford.edu:/srv/gsfs0/projects/mignot/hcrtgwas/
scp ambati@crick.stanford.edu:/home/ambati/HCRT_GWAS_AA/CHR**.86to87.* /media/labcomp/HDD/GWASProjects/batch2_jan25/HCRTSNPtest
scp ambati@scg4.stanford.edu:/srv/gsfs0/projects/mignot/hcrtgwas/hcrt.plate86to87updated* /media/labcomp/HDD/GWASProjects/batch2_jan25/HCRTSNPtest
########check costs for clusters
module load python/2.7
module add gbsc_billing
billable_job_stats
###############
#remote to local
scp ambati@scg4.stanford.edu:/srv/gsfs0/projects/mignot/hcrtgwas/HCRT_batch2_AA.fam /home/Documents/HCRT_GWAS_studies/.
#local to remote
scp /home/labcomp/Documents/HCRT_GWAS_studies/HCRT_SNPtest_75_jan20.assoc ambati@scg4.stanford.edu:/srv/gsfs0/projects/mignot/hcrtgwas
scp /home/labcomp/Documents/HCRT_GWAS_studies/HCRT_SNPtest_75_jan20.assoc ambati@scg4.stanford.edu:/home/ambati/HCRT_GWAS_AA
scp /home/labcomp/Documents/HCRT_GWAS_studies/batch2_jan25/batch2_AA.cov ambati@scg4.stanford.edu:/srv/gsfs0/projects/mignot/hcrtgwas
scp /home/labcomp/Documents/HCRT_GWAS_studies/batch2_jan25/duplicatesnps_batch2AA.txt ambati@scg4.stanford.edu:/srv/gsfs0/projects/mignot/hcrtgwas
head awk '{print $1" "$2" "$3" "$4" "$5" "$20" "$22" "$23}' HCRT_SNPtest_75_jan20.assoc > hcrt.mixed.plate77to85.CHRS.updated.MAF0.05.AA.rs
line=$(head -1 /srv/gsfs0/projects/mignot/hcrtgwas/hcrt.mixed.plate77to85.CHRs.updated.MAF0.05.rs)
scp ambati@scg4.stanford.edu:/home/ambati/HCRT_GWAS_AA/freq_stat.frq /home/labcomp/
#submit jobs
qsub -V -cwd plink_AA.sh
for i in `seq 2 33`
do
rsync -av --progress ambati@scg4-dtn01:/srv/gsfs0/projects/mignot/hcrtgwas/csfqtl/CSFq_chr**.ph"$i" /media/labcomp/HDD/GWASProjects/batch2_jan25/CSFQTLS
done
for i in {1..22}; do; cat .map | grep "$i" | cut -f -4 | uniq | cut -f -2 | keepers_.txt; done
for i in
cat HCRT_batch2_AA_2.map |cut -f -4 | uniq | cut -f -2 | keepers_chrx.txt
sed 's/\"//g' test_pheno > test2_pheno ##remove quotes
##SNP test numbering scheme , single pheno
10 1 #chr number
rsid 2
chromosome 3
position 4
alleleA 5
alleleB #coded allele 6
index 7
average_maximum_posterior_call 8
info 9
cohort_1_AA 10
cohort_1_AB 11
cohort_1_BB 12
cohort_1_NULL 13
all_AA 14
all_AB 15
all_BB 16
all_NULL 17
all_total 18
all_maf 19
missing_data_proportion 20
frequentist_add_pvalue 21
frequentist_add_info 22
frequentist_add_beta_1 23
frequentist_add_se_1 24
comment 25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment