@@ -22,6 +22,8 @@ Optional parameters:\n
22
22
[-i minutes that should be spend at most per chromosome to find matching random regions (default 3)]\n
23
23
[-j flag indicating that the reference genome contains a chr prefix]\n
24
24
[-t flag indicating that the annotation should be transcript and not gene based]\n
25
+ [-h a loop list file containing chromatin contacts]\n
26
+ [-s size of the loop window used around a genes promoter to link chromatin loops to genes (default 5000)]\n
25
27
[-q parameter to be set if only peak features should be computed (default FALSE)]\n"
26
28
27
29
# Initialising parameters
@@ -50,8 +52,10 @@ chrPrefix="FALSE"
50
52
backgroundRegions=" "
51
53
onlyPeakFeatures=" FALSE"
52
54
transcripts=" FALSE"
55
+ loopWindow=5000
56
+ loopList=" "
53
57
# Parsing command line
54
- while getopts " g:b:o:c:p:d:n:a:w:f:m:e:r:v:k:i:q:yluhxzjt" o;
58
+ while getopts " g:b:o:c:p:d:n:a:w:f:m:e:r:v:k:i:q:h:s: yluhxzjt" o;
55
59
do
56
60
case $o in
57
61
g) genome=$OPTARG ;;
@@ -78,10 +82,8 @@ case $o in
78
82
t) transcripts=" TRUE" ;;
79
83
k) backgroundRegions=$OPTARG ;;
80
84
q) onlyPeakFeatures=$OPTARG ;;
81
- h) echo -e $help
82
- exit 1;;
83
- [? ]) echo -e $help
84
- exit 1;;
85
+ h) loopList=$OPTARG ;;
86
+ s) loopWindow=$OPTARG ;;
85
87
esac
86
88
done
87
89
@@ -248,6 +250,11 @@ then
248
250
then
249
251
echo " motif_length " $motifLength >> $metadatafile
250
252
fi
253
+ if [ -n " $loopList " ];
254
+ then
255
+ echo " loop_list " $loopList >> $metadatafile
256
+ echo " loop_window " $loopWindow >> $metadatafile
257
+ fi
251
258
fi
252
259
if [ -n " $randomGenome " ];
253
260
then
425
432
if [ -n " $annotation " ];
426
433
then
427
434
echo " Generating gene scores"
428
- if [ -n " $dnase " ] || [ -n " $column " ] ;
435
+ if [ -n $loopList ]
429
436
then
430
- if [ " $originalScaling " == " FALSE " ] ;
437
+ if [ -n " $dnase " ] || [ -n " $column " ] ;
431
438
then
432
- 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}
439
+ if [ " $originalScaling " == " FALSE" ] ;
440
+ then
441
+ 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}
442
+ else
443
+ 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}
444
+ fi
433
445
else
434
- 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 }
435
- fi
446
+ 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 }
447
+ fi
436
448
else
437
- 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}
449
+ if [ -n " $dnase " ] || [ -n " $column " ] ;
450
+ then
451
+ if [ " $originalScaling " == " FALSE" ] ;
452
+ then
453
+ 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}
454
+ else
455
+ 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}
456
+ fi
457
+ else
458
+ 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}
459
+ fi
438
460
fi
461
+
439
462
if [ -n " $randomGenome " ] || [ -n " $backgroundRegions " ];
440
463
then
441
464
if [ -n " $dnase " ] || [ -n " $column " ] ;
0 commit comments