Running the primer designer for 4C viewpoints locally


1. Download 4Cpd.tgz and uncompress.
2. Go to the download section.
3. Download genome files for the organisms you want.
    3.1 Uncompress genome.tgz in the directory 4Cpd/data.
    3.2 Uncompress genome_blast.tgz in the directory 4Cpd/blast.
    3.3 Download .2bit files from UCSC genome browser if you want to provide genomic coordinates instead of using RefSeq genes or nucleotide sequences (see 2bit.sh).
4. Running the primer designer:
    4.1. cd to 4Cpd. You must run the program from this directory, due to dependencies.
    4.1 Configure param.txt, see below. This param.txt file name is hard coded in 4C_primer_designer.pl
    4.2 Assuming you correctly installed the genome and BLAST files, just do in the 4Cpd directory:
$ ./4C_primer_designer-noncgi.pl -o [output directory] > output.html
        You will need the Perl module Getopt::Long.
    4.3 Move output.html to [output directory] and open [output directory]/output.html in a web browser

The program depends on a few built-in Linux programs: grep, basename, ls, mkdir, cp, date, rm and touch. System calls by Perl are done throughout the script.

param.txt must contain certain options. The parameter names are self explanatory, check the web interface for help. All the parameters below are compulsory.
# contents of param.txt

product_size=100
reading_primer_len1=18
reading_primer_len2=23
min_frag_len=300
max_frag_len=1500
min_tm=57
max_tm=63
tm_diff=3
primer_num_return=5
max_hsp3=3
tryall=no
enzyme_mode=all
genome=mm9
acc=NM_001253822.11382
length1=3000
length2=3000

Selecting the gene to design promoter primers for

To select acc, i.e., the accession number of the gene that you want to design promoter primers for, you need to grep the gene symbol from data/genome.index:

$ grep -w Irx3 data/mm9.index
Irx3 chr8:94322409-94325553 - NM_001253822.11382

Use the RefSeq accession number on the right as acc to select genes.

Using nucleotide sequence instead of gene

If you use nt=ATAAGAGAGAGATAGAGA in param.txt and supress acc, primers will be searched for the nucleotide sequence provided.
. . .
enzyme_mode=all
genome=mm9
nt=AGAGATAGACAAGCAGGAGAGAAACACGAGAGCACGAAGAGAGCACAGG
. . .

Using coordinate instead of gene

If you use gcoord=chr1:1234-5678 in param.txt and supress acc, primers will be searched for the genomic coordinate provided. Only chr ID's present in the data/*.index files are allowed.
. . .
enzyme_mode=all
genome=mm9
gcoord=chr1:1234-5678
gcoord_length1=0
gcoord_length2=0
. . .

Enzyme mode

enzyme_mode can be all, limit (if you want to select a short list of enzymes to be tested) or specify (if you want to choose the primary and secondary enzymes).

If you select enzyme_mode=specify, then you must also provide 2 enzymes:
enzyme_mode=specify
enzyme1=BglII
enzyme2=Csp6I

If you select enzyme_mode=limit, then you must also provide a list of enzymes:
enzyme_mode=limit
enzyme_list=BglII,Csp6I,NlaIII

Primer3 executable

primer3 compiled in one of my Ubuntu 12.04's doesn't work in my 10.04 because of a library dependency.
If that happens to you, compile one that works from here http://primer3.sourceforge.net/releases.php, delete the primer3_core symbolic link and create one to your new executable.