-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrun_tfTarget.bsh
58 lines (47 loc) · 3.62 KB
/
run_tfTarget.bsh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/bash
if [ "$#" -lt 18 ]; then
echo ""
echo "USAGE: bash run_tfTarget.bsh -query [query.bigWig] -control [control.bigWig] -prefix [prefix] -TRE.path [dreg_path] -gene.path [gene_path] -2bit.path [twoBit_path]"
echo ""
echo "minimum arguments:"
echo "[query.bigWig] -- query file names of PRO-seq in bigWig format, ordered by plus and minus pairings, e.g. query1.plus.bw query1.minus.bw query2.plus.bw query2.minus.bw ... (The default directory is the current working directory, use -bigWig.path to specify if otherwise.)"
echo "[control.bigWig] -- control file names of PRO-seq in bigWig format, ordered by plus and minus pairings, e.g. control1.plus.bw control1.minus.bw control2.plus.bw control2.minus.bw ... (The default directory is the current working directory, use -bigWig.path to specify if otherwise.)"
echo "[prefix] -- prefix for the output pdfs and txts."
echo "[dreg_path] --input TRE regions, e.g. dREG sites, in bed3 format. Only the first three columns will be used."
echo "[gene_path] --Gene annotation file in bed6 format. Can be prepared from gencode or Refseq gtf files. We recommend to use gene ID and gene name for the 4th and 5th columns. The information will show up in the output. https://www.gencodegenes.org/releases/current.html ."
echo "[twoBit_path] --2bit files for your genome of interest. Find links to these here: http://hgdownload.cse.ucsc.edu/downloads.html ."
echo ""
echo ""
echo "optional arguments:"
echo ""
echo "Optional system arguements:"
echo "-bigWig.path: path to the bigWig files. default is the current directory. "
echo "-ncores: number of threads to use. default=1."
echo "-deseq: Use this tag indicates to run DEseq2 only. default is off."
echo "-rtfbsdb: Use this tag indicates to run DEseq2 and then rtfbsdb only. default is off."
echo ""
echo "Optional DEseq2 arguments:"
echo "-pval.up: adjusted pvalue cutoff below which indicates differentially transcribed TREs. default=0.01."
echo "-pval.down: adjusted pvalue cutoff above which indicates TREs that are not significantly changed between query and control. default=0.1."
echo ""
echo "Optional rtfbsdb arguments:"
echo "-tfs.path: use this tag to specify tfs object from non-Homo sapiens species. Can be prepared using get.tfs.R. See the 'https://github.com/Danko-Lab/tfTarget#requires' ."
echo "-cycles: how many cycles to run GC-subsampled motif enrichment test. default=2."
echo "-mTH: threshold over which the TF motif is defined as significant different from the HMM background. default=7."
echo "-fdr.cutoff: cutoff of the median of pvalues from multiple GC-subsampled runs, above which defines significantly enriched motifs. default=0.05."
echo ""
echo "Optional mapTF arguments:"
echo "-dist: the distance cutoff (in base pair) for associating TRE to the nearest annotated transcriptional start site.
Default=50000."
echo "-closest.N: use this tag to report only the first nth genes to the TRE, can be used in combination with -dist.
Default is 2. To disable it, use '-closest.N off'."
echo "-pval.gene: use this tag to report only genes that are significantly differentially transcribed genes
1) at the same direction as the regulator TRE, and
2) with adjusted pval lower than the cutoff specified.
Default is 0.05. To disable it, use '-pval.gene off'."
echo "The default parameters were chosen based on the ChRO-seq paper 'https://www.biorxiv.org/content/early/2018/05/13/185991'."
echo ""
exit 1
fi
echo "Using: R --vanilla --slave --args" "$@" "<main.R"
R --vanilla --slave --args "$@" <main.R