Last active
August 29, 2015 14:25
-
-
Save nimezhu/4e69abf8cce272fee776 to your computer and use it in GitHub Desktop.
compare two time course expression, find the changing genes, clustering them and find the enriched motif
This file contains hidden or 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
if [[ $# -lt 2 ]] ; then | |
echo "Usage: cmpseries_pipeline.sh SeriesA.tsv SeriesB.tsv" | |
exit 0 | |
fi | |
x=${1##*/} i=${x%.*} | |
y=${2##*/} | |
j=${y%.*} | |
resp="${i}_vs_${j}.resp.txt" | |
echo "respondGenes.py -i $1 $2 -o $resp" | |
respondGenes.py -i $1 $2 -o $resp | |
oi=$i.${resp%.*}.tsv | |
echo "getsubset.py -i $resp -t $1 -o $oi" | |
getsubset.py -i $resp -t $1 -o $oi | |
oj=$j.${resp%.*}.tsv | |
echo "getsubset.py -i $resp -t $2 -o $oj" | |
getsubset.py -i $resp -t $2 -o $oj | |
ocmp=${resp%.*}.cmp.tsv | |
echo "CmpSeries $oi $oj > $ocmp" | |
CmpSeries $oi $oj > $ocmp | |
diffgene="${ocmp%.*}.diff.tsv" | |
awk '$3<0.5' $ocmp > $diffgene | |
diffi=${oi%.*}.diff.tsv | |
diffj=${oj%.*}.diff.tsv | |
getsubset.py -i $diffgene -t $1 > $diffi | |
getsubset.py -i $diffgene -t $2 > $diffj | |
oakmeans=${diffgene%.*}.akmeans.tsv | |
akmeans.py -i $diffi $diffj -M -o $oakmeans | |
awk -v o=${oakmeans%.*} 'NR >= 2 { print >> o".group."$6 }' $oakmeans | |
for f in *.group.* | |
do | |
hg19_genelist_corepromoter_motif_tfbs_enrichment.py -i $f -b $resp -o ${f}.motif.out | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment