-
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.
- Loading branch information
1 parent
6dceaf7
commit 9f05af0
Showing
18 changed files
with
190 additions
and
323 deletions.
There are no files selected for viewing
22 changes: 0 additions & 22 deletions
22
Genome-Reference-File-Retreival/All.chrs.GRCh38.genotypes.20170504.bcf.sh
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
54 changes: 0 additions & 54 deletions
54
Genome-Reference-File-Retreival/GRCh37_Reference_Genome_Retreival.sh
This file was deleted.
Oops, something went wrong.
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,35 +1,47 @@ | ||
#!bin/bash | ||
|
||
########################################################################### | ||
# MISEQ DATA | ||
# PILOT DATA | ||
# Export Env Variables | ||
########################################################################### | ||
|
||
export GATK=$HOME/toolbin/gatk-4.1.8.1/gatk | ||
export REFDIR=/media/drew/easystore/ReferenceGenomes/ | ||
export BEDDIR=/media/drew/easystore/ReferenceGenomes/BEDs | ||
export BEDDIR=$REFDIR/BEDs | ||
export BEDFILE=$BEDDIR/3215481_Covered.bed | ||
export IDXDIR=$REFDIR/GRCh38/GCA_000001405.15_GRCh38_no_alt_analysis_set | ||
export REFFILE=$IDXDIR/GCA_000001405.15_GRCh38_no_alt_analysis_set.fna | ||
export REFFAI=$IDXDIR/GCA_000001405.15_GRCh38_no_alt_analysis_set.fna.fai | ||
|
||
for file in $IDXDIR; do | ||
ln -s $file | ||
done | ||
|
||
#cd ~/Downloads/GoodCell-Resources/GuniosAnalysis/2019_09/LVB_fastq_Sept2019_concat_fastq | ||
#find -iname "*_R1_0012.fastq.gz" | cut -d/ -f2 | cut -d_ -f1 >> ../sm.txt | ||
|
||
export IDXDIR=$REFDIR/GCA_000001405.15_GRCh38_no_alt_analysis_set | ||
export REFFA=$IDXDIR/GCA_000001405.15_GRCh38_no_alt_analysis_set.fna | ||
export REFFAI=$IDXDIR/GCA_000001405.15_GRCh38_no_alt_analysis_set.fna.fai | ||
export WORKDIR=/media/drew/easystore/GoodCell-Resources/AnalysisBaseDir/MiSeq_Data | ||
########################################################################### | ||
## COMPUTE COVERAGE OVER TARGETS ## | ||
########################################################################### | ||
|
||
sm_arr=( $(cat sm.txt) ) | ||
n=${#sm_arr[@]} | ||
for sm in ${sm_arr[@]}; do | ||
bedtools coverage -g $REFFAI -sorted -a $BEDFILE -b $sm.bam -mean | \ | ||
cut -f5 > $sm.cov | ||
declare -A miseqdir=( ["2019_09"]="2019_09" ["2019_12"]="2019_12" ) | ||
declare -A datadir=( ["2019_09"]="MiSeq_Results_out/3.GRP_BAMs" ["2019_12"]="MiSeq_Results_out/3.GRP_BAMs" ) | ||
declare -A coverage=( ["2019_09"]="MiSeq_Results_out/Coverage_out" ["2019_12"]="MiSeq_Results_out/Coverage_out" ) | ||
declare -A v2s=( ["2019_09"]="MiSeq_Results_out/4.V2_BAMs" ["2019_12"]="MiSeq_Results_out/4.V2_BAMs" ) | ||
|
||
for pfx in 2019_09 2019_12; do | ||
miseqdir=${miseqdir[$pfx]} | ||
datadir=${datadir[$pfx]} | ||
coverage=${coverage[$pfx]} | ||
cd $WORKDIR/$miseqdir | ||
export INPUT_FILE=sm.txt | ||
export INPUTDIR=$datadir | ||
export OUTPUT=$coverage | ||
sm_arr=( $(cat $INPUT_FILE) ) | ||
n=${#sm_arr[@]} | ||
echo $n | ||
for i in $(seq 1 $n); do | ||
sm_arr=( $(cat $INPUT_FILE) ); | ||
sm=${sm_arr[(($i-1))]}; | ||
echo $sm | ||
pwd | ||
bedtools coverage -g $REFFAI -sorted -a $BEDFILE -b $INPUTDIR/$sm.bam -mean | \ | ||
cut -f5 > $OUTPUT/$sm.cov | ||
done | ||
(echo -en "CHROM\tBEG\tEND\tNAME\t"; tr '\n' '\t' < sm.txt | sed 's/\t$/\n/'; \ | ||
paste $BEDFILE $(cat sm.txt | sed 's/$/.cov/' | tr '\n' '\t' | sed 's/\t$/\n/')) \ | ||
> $BEDDIR/3215481_Covered.GRCh38.tsv | ||
done | ||
(echo -en "CHROM\tBEG\tEND\tNAME\t"; tr '\n' '\t' < sm.txt | sed 's/\t$/\n/'; \ | ||
paste $BEDFILE $(cat sm.txt | sed 's/$/.cov/' | tr '\n' '\t' | sed 's/\t$/\n/')) \ | ||
> 3215481_Covered.GRCh38.tsv | ||
#/bin/rm $(cat sm.txt | sed 's/$/.cov/' | tr '\n' '\t' | sed 's/\t$/\n/') |
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,44 @@ | ||
#!bin/bash | ||
|
||
########################################################################### | ||
# Export Env Variables | ||
########################################################################### | ||
|
||
export GATK=$HOME/toolbin/gatk-4.1.8.1/gatk | ||
export REFDIR=/media/drew/easystore/ReferenceGenomes/ | ||
export BEDDIR=$REFDIR/BEDs | ||
export BEDFILE=$BEDDIR/3215481_Covered.bed | ||
|
||
export IDXDIR=$REFDIR/GCA_000001405.15_GRCh38_no_alt_analysis_set | ||
export REFFA=$IDXDIR/GCA_000001405.15_GRCh38_no_alt_analysis_set.fna | ||
export REFFAI=$IDXDIR/GCA_000001405.15_GRCh38_no_alt_analysis_set.fna.fai | ||
export WORKDIR=/media/drew/easystore/GoodCell-Resources/AnalysisBaseDir/MiSeq_Data | ||
########################################################################### | ||
## COMPUTE COVERAGE OVER TARGETS ## | ||
########################################################################### | ||
|
||
declare -A miseqdir=( ["2019_09"]="2019_09" ["2019_12"]="2019_12" ) | ||
declare -A datadir=( ["2019_09"]="MiSeq_Results_out/3.GRP_BAMs" ["2019_12"]="MiSeq_Results_out/3.GRP_BAMs" ) | ||
declare -A coverage=( ["2019_09"]="MiSeq_Results_out/Coverage_out" ["2019_12"]="MiSeq_Results_out/Coverage_out" ) | ||
declare -A v2s=( ["2019_09"]="MiSeq_Results_out/4.V2_BAMs" ["2019_12"]="MiSeq_Results_out/4.V2_BAMs" ) | ||
|
||
for pfx in 2019_09 2019_12; do | ||
miseqdir=${miseqdir[$pfx]} | ||
datadir=${datadir[$pfx]} | ||
coverage=${coverage[$pfx]} | ||
cd $WORKDIR/$miseqdir | ||
export INPUT_FILE=sm.txt | ||
export INPUTDIR=$datadir | ||
export OUTPUT=$coverage | ||
sm_arr=( $(cat $INPUT_FILE) ) | ||
n=${#sm_arr[@]} | ||
for i in $(seq 1 $n); do | ||
sm_arr=( $(cat $INPUT_FILE) ); | ||
sm=${sm_arr[(($i-1))]}; | ||
bedtools coverage -g $REFFAI -sorted -a $BEDFILE -b $INPUTDIR/$sm.bam -mean | \ | ||
cut -f5 > $OUTPUT/$sm.cov | ||
done | ||
(echo -en "CHROM\tBEG\tEND\tNAME\t"; tr '\n' '\t' < sm.txt | sed 's/\t$/\n/'; \ | ||
paste $BEDFILE $(cat sm.txt | sed 's/$/.cov/' | tr '\n' '\t' | sed 's/\t$/\n/')) \ | ||
> $BEDDIR/3215481_Covered.GRCh38.tsv | ||
done |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.