Skip to content

Commit

Permalink
Added chromatin conformation capture module
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian411 committed Jun 26, 2019
1 parent 7f1bc98 commit 7b7f988
Show file tree
Hide file tree
Showing 7 changed files with 402 additions and 12 deletions.
45 changes: 34 additions & 11 deletions Code/TEPIC.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Optional parameters:\n
[-i minutes that should be spend at most per chromosome to find matching random regions (default 3)]\n
[-j flag indicating that the reference genome contains a chr prefix]\n
[-t flag indicating that the annotation should be transcript and not gene based]\n
[-h a loop list file containing chromatin contacts]\n
[-s size of the loop window used around a genes promoter to link chromatin loops to genes (default 5000)]\n
[-q parameter to be set if only peak features should be computed (default FALSE)]\n"

#Initialising parameters
Expand Down Expand Up @@ -50,8 +52,10 @@ chrPrefix="FALSE"
backgroundRegions=""
onlyPeakFeatures="FALSE"
transcripts="FALSE"
loopWindow=5000
loopList=""
#Parsing command line
while getopts "g:b:o:c:p:d:n:a:w:f:m:e:r:v:k:i:q:yluhxzjt" o;
while getopts "g:b:o:c:p:d:n:a:w:f:m:e:r:v:k:i:q:h:s:yluhxzjt" o;
do
case $o in
g) genome=$OPTARG;;
Expand All @@ -78,10 +82,8 @@ case $o in
t) transcripts="TRUE";;
k) backgroundRegions=$OPTARG;;
q) onlyPeakFeatures=$OPTARG;;
h) echo -e $help
exit 1;;
[?]) echo -e $help
exit 1;;
h) loopList=$OPTARG;;
s) loopWindow=$OPTARG;;
esac
done

Expand Down Expand Up @@ -248,6 +250,11 @@ then
then
echo "motif_length "$motifLength >> $metadatafile
fi
if [ -n "$loopList" ];
then
echo "loop_list "$loopList >> $metadatafile
echo "loop_window "$loopWindow >> $metadatafile
fi
fi
if [ -n "$randomGenome" ];
then
Expand Down Expand Up @@ -425,17 +432,33 @@ fi
if [ -n "$annotation" ];
then
echo "Generating gene scores"
if [ -n "$dnase" ] || [ -n "$column" ] ;
if [ -n $loopList ]
then
if [ "$originalScaling" == "FALSE" ] ;
if [ -n "$dnase" ] || [ -n "$column" ] ;
then
python ${working_dir}/annotateTSS.py ${annotation} ${affinity} "--geneViewAffinity" ${prefix}_Affinity_Gene_View.txt "--windows" $window "--decay" $decay "--peakCoverage" ${prefix}_Peak_Coverage.txt "--geneBody" ${geneBody} "--normaliseLength" ${lengthNorm} "--motifLength" ${motifLength} "--additionalPeakFeatures" ${peakFeatures} "--onlyPeakFeatures" ${onlyPeakFeatures} "--transcript" ${transcripts}
if [ "$originalScaling" == "FALSE" ] ;
then
python ${working_dir}/annotateTSS.py ${annotation} ${affinity} "--geneViewAffinity" ${prefix}_Affinity_Gene_View.txt "--windows" $window "--decay" $decay "--peakCoverage" ${prefix}_Peak_Coverage.txt "--geneBody" ${geneBody} "--normaliseLength" ${lengthNorm} "--motifLength" ${motifLength} "--additionalPeakFeatures" ${peakFeatures} "--onlyPeakFeatures" ${onlyPeakFeatures} "--transcript" ${transcripts} "--lwindows" ${loopWindow} "--conformationData" ${loopList}
else
python ${working_dir}/annotateTSS.py ${annotation} ${affinity} "--geneViewAffinity" ${prefix}_Affinity_Gene_View.txt "--windows" $window "--decay" $decay "--geneBody" ${geneBody} "--normaliseLength" ${lengthNorm} "--motifLength" ${motifLength} "--signalScale" ${prefix}_Scaled_Affinity.txt "--additionalPeakFeatures" ${peakFeatures} "--onlyPeakFeatures" ${onlyPeakFeatures} "--transcript" ${transcripts} "--lwindows" ${loopWindow} "--conformationData" ${loopList}
fi
else
python ${working_dir}/annotateTSS.py ${annotation} ${affinity} "--geneViewAffinity" ${prefix}_Affinity_Gene_View.txt "--windows" $window "--decay" $decay "--geneBody" ${geneBody} "--normaliseLength" ${lengthNorm} "--motifLength" ${motifLength} "--signalScale" ${prefix}_Scaled_Affinity.txt "--additionalPeakFeatures" ${peakFeatures} "--onlyPeakFeatures" ${onlyPeakFeatures} "--transcript" ${transcripts}
fi
python ${working_dir}/annotateTSS.py ${annotation} ${affinity} "--geneViewAffinity" ${prefix}_Affinity_Gene_View.txt "--windows" $window "--decay" $decay "--geneBody" $geneBody "--geneBody" ${geneBody} "--normaliseLength" ${lengthNorm} "--motifLength" ${motifLength} "--additionalPeakFeatures" ${peakFeatures} "--onlyPeakFeatures" ${onlyPeakFeatures} "--transcript" ${transcripts} "--lwindows" ${loopWindow} "--conformationData" ${loopList}
fi
else
python ${working_dir}/annotateTSS.py ${annotation} ${affinity} "--geneViewAffinity" ${prefix}_Affinity_Gene_View.txt "--windows" $window "--decay" $decay "--geneBody" $geneBody "--geneBody" ${geneBody} "--normaliseLength" ${lengthNorm} "--motifLength" ${motifLength} "--additionalPeakFeatures" ${peakFeatures} "--onlyPeakFeatures" ${onlyPeakFeatures} "--transcript" ${transcripts}
if [ -n "$dnase" ] || [ -n "$column" ] ;
then
if [ "$originalScaling" == "FALSE" ] ;
then
python ${working_dir}/annotateTSS.py ${annotation} ${affinity} "--geneViewAffinity" ${prefix}_Affinity_Gene_View.txt "--windows" $window "--decay" $decay "--peakCoverage" ${prefix}_Peak_Coverage.txt "--geneBody" ${geneBody} "--normaliseLength" ${lengthNorm} "--motifLength" ${motifLength} "--additionalPeakFeatures" ${peakFeatures} "--onlyPeakFeatures" ${onlyPeakFeatures} "--transcript" ${transcripts}
else
python ${working_dir}/annotateTSS.py ${annotation} ${affinity} "--geneViewAffinity" ${prefix}_Affinity_Gene_View.txt "--windows" $window "--decay" $decay "--geneBody" ${geneBody} "--normaliseLength" ${lengthNorm} "--motifLength" ${motifLength} "--signalScale" ${prefix}_Scaled_Affinity.txt "--additionalPeakFeatures" ${peakFeatures} "--onlyPeakFeatures" ${onlyPeakFeatures} "--transcript" ${transcripts}
fi
else
python ${working_dir}/annotateTSS.py ${annotation} ${affinity} "--geneViewAffinity" ${prefix}_Affinity_Gene_View.txt "--windows" $window "--decay" $decay "--geneBody" $geneBody "--geneBody" ${geneBody} "--normaliseLength" ${lengthNorm} "--motifLength" ${motifLength} "--additionalPeakFeatures" ${peakFeatures} "--onlyPeakFeatures" ${onlyPeakFeatures} "--transcript" ${transcripts}
fi
fi

if [ -n "$randomGenome" ] || [ -n "$backgroundRegions" ];
then
if [ -n "$dnase" ] || [ -n "$column" ] ;
Expand Down
Loading

0 comments on commit 7b7f988

Please sign in to comment.