Skip to content

Commit

Permalink
update t-test message and add info to readme on compile time
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorKMDay committed Apr 26, 2019
1 parent d005744 commit 8ba7643
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
17 changes: 15 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ seedsdir=$(shell head -n1 analysis/allseeds.txt)
#! allseeds.txt
allseeds=$(shell tail -n+2 analysis/allseeds.txt)

#! Count how many seeds there are
n_seeds=$(words $(strip $(allseeds)))

# Check to make sure there are no hyphens in seed names, they'll muck things up
ifneq ($(findstring -,$(allseeds)),)
$(error Hyphen in one or more seed name(s))
Expand All @@ -41,6 +44,9 @@ endif
#! What are the groups in this analysis?
groups=$(patsubst group-%.txt, %, $(wildcard group-[[:alpha:]]*.txt ))

#! Count how many groups there are
n_groups=$(words $(strip $(groups)))

# Check to make sure there are no hyphens in group names, they'll muck things up
ifneq ($(findstring -,$(groups)),)
$(error Hyphen in one or more group name(s))
Expand All @@ -52,6 +58,9 @@ contrasts=$(foreach g1,$(groups), \
$(foreach g2,$(groups), \
$(filter-out $(g1)-$(g1),$(g1)-$(g2) ) ))

#! Count how many contrasts there are
n_contrasts=$(words $(strip $(contrasts)))

# If a covariate file is given, add the flag to the covariate variable and
# store the number of covariates for later. Otherwise, store the number of
# covariates as 0.
Expand All @@ -74,12 +83,16 @@ endif
#! Will be echoed any time makefile is interacted with.
ifndef PAIRED
pairflag=
$(info Doing an UNPAIRED t-test)
$(info t-test is set to UNPAIRED)
else
pairflag=-paired
$(info Doing a PAIRED t-test)
$(info t-test is set to PAIRED)
endif

# Give the user a message while the makefile compiles.
$(info Preparing your makefile ... $(n_groups) groups, \
$(n_contrasts) contrasts, and $(n_seeds) seeds)

################################################################################
# Single-group analysis

Expand Down
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ Below is a general guide to setting up this pipeline for any project.
We assume that you will clone this repository and, in that directory,
follow these instructions.

This script creates a number of recipes based on the number of groups and seeds.
The number of recipes it has to create is based on:

seeds * groups + seeds * contrasts

where `contrasts` is:

seeds^2 - seeds

So, the time it takes make to prepare rises with the square of groups *and*
linearly with the number of seeds. As these increase, make might take a while to
get ready to be invoked, and might look like it's hanging. Try `make
test-contrasts` to see how long it takes to compile.

*Important*: Do not use a hyphen (`-`) in group, seed, or covariate names.
Or anywhere, really. The system relies in many places on hyphens being used
exclusively to identify contrasts (e.g. `patient-control`). I have built in a
Expand Down Expand Up @@ -308,7 +322,8 @@ one-core execution to complete.
#### 8.2 Parellelizing on the grid engine

Check that the grid engine is set up properly for your user/machine. See
[here](http://faculty.washington.edu/madhyt/using-the-gridengine-to-process-data-quickly/) for instructions.
[here](http://faculty.washington.edu/madhyt/using-the-gridengine-to-process-data-quickly/)
for instructions.

You can submit the jobs on the queue with `qmake`:

Expand Down

0 comments on commit 8ba7643

Please sign in to comment.