-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the JunctionLibrary wiki!
This library is a set of script useful for making tectoRNA libraries.
A tectoRNA is a heterodimer that is often defined in terms of its different modular segments. Each member of the simplest class of tectoRNAs has a loop, helix, receptor, and base helix below the receptor. In an RNAMaP experiment, the tectoRNA piece may also be ordered with 'adapters', or common sequences that allow PCR and thus library assembly.
To assemble a set of tectoRNA chip pieces, you can use the following script:
python ~/JunctionLibrary/assemble_tecto_seqs.py -h
-h, --help show this help message and exit
-a STARTING_SEQ, --starting_seq STARTING_SEQ
seed sequence, i.e. a loop. Must hve "seq" column.
-b ADD_SEQS [ADD_SEQS ...], --add_seqs ADD_SEQS [ADD_SEQS ...]
list of filenames of sequences to add. All should have
columns "side1" and "side2" of the adapter sequences
-out OUT_FILE, --out_file OUT_FILE
file to save output
The inputs are separated into two arguments. 'starting_seq' should be a single filename that has a column 'seq' onto which all of the other sequences are added. In the tectoRNA, this is the tetraloop, i.e.:
seq loop_name
GGAA GGAA
(Any other column besides 'seq' is assumed to be an annotation.)
The argument 'add_seqs' can be multiple filenames, given in the order that they should be added to the starting seq. For example, to generate a tectoRNA, you must provide the helix sequence, then the receptor sequences, then the base helix sequences. Another option is to provide the helix sequence above a junction, the junction sequence, the helix sequence below the junction, then the receptor and base helix sequences. Each of these files has to have columns 'side1' and 'side2', each of which gives the sequence (5' to 3') of the segment 5' of the loop (side1) or 3' of the loop (side2). All other columns are assumed to be annotations. For example, the file:
side1 side2 r_name
UAUGG CCUAAG 11ntR
UACGG CCUACG 11ntR_5C_9C
UAUGG CCUACG 11ntR_5C
CAUGG CCUAAA 11ntR_6A_7C
CACGG CCUAAA 11ntR_6A_7C_9C
UAUGG CCUGUG C7.10
GAUGG CCUGUAC C7.2
UAUGG CCUGAAG C7.9
GAGGG CCCUAAC IC3
GUAGG CCUAAAC VC2
gives the sequence of 10 distinct receptors, with distinct names (r_name).
In the assemble_tecto_seqs script, all of the combinations of loop, helix, receptor, base, and adapters are saved in a final output file.
For example, the command:
python ~/JunctionLibrary/assemble_tecto_seqs -a seq_params/loop_1.dat -b seq_params/helix_sides_8.dat seq_params/receptors_2.dat seq_params/base_1.dat -out tecto_rnas_16.dat
Would generate 16 possible sequences, with 8 different helical contexts and 2 different receptors, like the output below: (all files should be included in JunctionLibrary/seq_params/ directory.)
seq loop_name starting_seq \
0 CUAGGAUAUGGAAUGCACAGGGGAACCUGUGCAUUCCUAAGUCCUAG GGAA GGAA
1 CUAGGAGAGGGAAUGCACAGGGGAACCUGUGCAUUCCCUAACUCCUAG GGAA GGAA
2 CUAGGAUAUGGACAACCUUGGGGAACCAAGGUUGUCCUAAGUCCUAG GGAA GGAA
3 CUAGGAGAGGGACAACCUUGGGGAACCAAGGUUGUCCCUAACUCCUAG GGAA GGAA
4 CUAGGAUAUGGGGAGGUCUUGGGAACAAGACCUCCCCUAAGUCCUAG GGAA GGAA
5 CUAGGAGAGGGGGAGGUCUUGGGAACAAGACCUCCCCCUAACUCCUAG GGAA GGAA
6 CUAGGAUAUGGGGGGAUCUUGGGAACAAGAUCCCCCCUAAGUCCUAG GGAA GGAA
7 CUAGGAGAGGGGGGGAUCUUGGGAACAAGAUCCCCCCCUAACUCCUAG GGAA GGAA
8 CUAGGAUAUGGAAGCCGGUCGGGAACGACCAGGCUUCCUAAGUCCUAG GGAA GGAA
9 CUAGGAGAGGGAAGCCGGUCGGGAACGACCAGGCUUCCCUAACUCCUAG GGAA GGAA
10 CUAGGAUAUGGAAGCCGGUCGGGAACGACCGUGGCUUCCUAAGUCCUAG GGAA GGAA
11 CUAGGAGAGGGAAGCCGGUCGGGAACGACCGUGGCUUCCCUAACUC... GGAA GGAA
12 CUAGGAUAUGGAAGCGACGUCGGGAACGACGCGCUUCCUAAGUCCUAG GGAA GGAA
13 CUAGGAGAGGGAAGCGACGUCGGGAACGACGCGCUUCCCUAACUCCUAG GGAA GGAA
14 CUAGGAUAUGGAACUGAGUCGGGAACGACUGAGUUCCUAAGUCCUAG GGAA GGAA
15 CUAGGAGAGGGAACUGAGUCGGGAACGACUGAGUUCCCUAACUCCUAG GGAA GGAA
old_idx junction_seq helix_one_length length r_name b_name
0 35600 NaN NaN 10 11ntR normal
1 35600 NaN NaN 10 IC3 normal
2 34890 NaN NaN 10 11ntR normal
3 34890 NaN NaN 10 IC3 normal
4 35275 NaN NaN 10 11ntR normal
5 35275 NaN NaN 10 IC3 normal
6 35311 NaN NaN 10 11ntR normal
7 35311 NaN NaN 10 IC3 normal
8 14007 CCGG_CCAGG 3 10 11ntR normal
9 14007 CCGG_CCAGG 3 10 IC3 normal
10 14073 CCGG_CCGUGG 3 10 11ntR normal
11 14073 CCGG_CCGUGG 3 10 IC3 normal
12 13802 CGACG_CGCG 3 10 11ntR normal
13 13802 CGACG_CGCG 3 10 IC3 normal
14 13854 CUGAG_CUGAG 2 10 11ntR normal
15 13854 CUGAG_CUGAG 2 10 IC3 normal
To order the library, you'll also want to add 'adapter sequences' which form the primer landing site for amplification. You can do this with:
python ~/JunctionLibrary/assemble_tecto_seqs -a tecto_rnas_16.dat -b seq_params/adapters_1.dat -out tecto_rnas_16_w_adapter.dat
which gives the output:
seq loop_name \
0 UUGUAUGGAAGACGUUCCUGGAUCCCUAGGAUAUGGAAUGCACAGG... GGAA
1 UUGUAUGGAAGACGUUCCUGGAUCCCUAGGAGAGGGAAUGCACAGG... GGAA
2 UUGUAUGGAAGACGUUCCUGGAUCCCUAGGAUAUGGACAACCUUGG... GGAA
3 UUGUAUGGAAGACGUUCCUGGAUCCCUAGGAGAGGGACAACCUUGG... GGAA
4 UUGUAUGGAAGACGUUCCUGGAUCCCUAGGAUAUGGGGAGGUCUUG... GGAA
5 UUGUAUGGAAGACGUUCCUGGAUCCCUAGGAGAGGGGGAGGUCUUG... GGAA
6 UUGUAUGGAAGACGUUCCUGGAUCCCUAGGAUAUGGGGGGAUCUUG... GGAA
7 UUGUAUGGAAGACGUUCCUGGAUCCCUAGGAGAGGGGGGGAUCUUG... GGAA
8 UUGUAUGGAAGACGUUCCUGGAUCCCUAGGAUAUGGAAGCCGGUCG... GGAA
9 UUGUAUGGAAGACGUUCCUGGAUCCCUAGGAGAGGGAAGCCGGUCG... GGAA
10 UUGUAUGGAAGACGUUCCUGGAUCCCUAGGAUAUGGAAGCCGGUCG... GGAA
11 UUGUAUGGAAGACGUUCCUGGAUCCCUAGGAGAGGGAAGCCGGUCG... GGAA
12 UUGUAUGGAAGACGUUCCUGGAUCCCUAGGAUAUGGAAGCGACGUC... GGAA
13 UUGUAUGGAAGACGUUCCUGGAUCCCUAGGAGAGGGAAGCGACGUC... GGAA
14 UUGUAUGGAAGACGUUCCUGGAUCCCUAGGAUAUGGAACUGAGUCG... GGAA
15 UUGUAUGGAAGACGUUCCUGGAUCCCUAGGAGAGGGAACUGAGUCG... GGAA
starting_seq old_idx junction_seq \
0 CUAGGAUAUGGAAUGCACAGGGGAACCUGUGCAUUCCUAAGUCCUAG 35600 NaN
1 CUAGGAGAGGGAAUGCACAGGGGAACCUGUGCAUUCCCUAACUCCUAG 35600 NaN
2 CUAGGAUAUGGACAACCUUGGGGAACCAAGGUUGUCCUAAGUCCUAG 34890 NaN
3 CUAGGAGAGGGACAACCUUGGGGAACCAAGGUUGUCCCUAACUCCUAG 34890 NaN
4 CUAGGAUAUGGGGAGGUCUUGGGAACAAGACCUCCCCUAAGUCCUAG 35275 NaN
5 CUAGGAGAGGGGGAGGUCUUGGGAACAAGACCUCCCCCUAACUCCUAG 35275 NaN
6 CUAGGAUAUGGGGGGAUCUUGGGAACAAGAUCCCCCCUAAGUCCUAG 35311 NaN
7 CUAGGAGAGGGGGGGAUCUUGGGAACAAGAUCCCCCCCUAACUCCUAG 35311 NaN
8 CUAGGAUAUGGAAGCCGGUCGGGAACGACCAGGCUUCCUAAGUCCUAG 14007 CCGG_CCAGG
9 CUAGGAGAGGGAAGCCGGUCGGGAACGACCAGGCUUCCCUAACUCCUAG 14007 CCGG_CCAGG
10 CUAGGAUAUGGAAGCCGGUCGGGAACGACCGUGGCUUCCUAAGUCCUAG 14073 CCGG_CCGUGG
11 CUAGGAGAGGGAAGCCGGUCGGGAACGACCGUGGCUUCCCUAACUC... 14073 CCGG_CCGUGG
12 CUAGGAUAUGGAAGCGACGUCGGGAACGACGCGCUUCCUAAGUCCUAG 13802 CGACG_CGCG
13 CUAGGAGAGGGAAGCGACGUCGGGAACGACGCGCUUCCCUAACUCCUAG 13802 CGACG_CGCG
14 CUAGGAUAUGGAACUGAGUCGGGAACGACUGAGUUCCUAAGUCCUAG 13854 CUGAG_CUGAG
15 CUAGGAGAGGGAACUGAGUCGGGAACGACUGAGUUCCCUAACUCCUAG 13854 CUGAG_CUGAG
helix_one_length length r_name b_name a_name
0 NaN 10 11ntR normal truseq
1 NaN 10 IC3 normal truseq
2 NaN 10 11ntR normal truseq
3 NaN 10 IC3 normal truseq
4 NaN 10 11ntR normal truseq
5 NaN 10 IC3 normal truseq
6 NaN 10 11ntR normal truseq
7 NaN 10 IC3 normal truseq
8 3 10 11ntR normal truseq
9 3 10 IC3 normal truseq
10 3 10 11ntR normal truseq
11 3 10 IC3 normal truseq
12 3 10 11ntR normal truseq
13 3 10 IC3 normal truseq
14 2 10 11ntR normal truseq
15 2 10 IC3 normal truseq
IF you want to generate single mutations of a set of sequences, you can use the script:
python ~/JunctionLibrary/mutate_seqs.py -h
-h, --help show this help message and exit
-s SEQS, --seqs SEQS sequences (i.e. side1 and side2) to mutate.
-p POSITIONS, --positions POSITIONS
positions to mutate. should be a string, ; separated
for two sides, comma separated for positions
-out OUT_FILE, --out_file OUT_FILE
file to save output
This may be useful for generating all single mutants of a tertiary contact. You can also choose a subset of positions to mutate, i.e. -p "1,2,3;5" will mutate positions 1, 2, and 3 on side1 and position 5 on side2 (IMPORTANT: these are 0-indexed as is standard for python) (Also important: the semicolon and commas may mean you need this argument in double quotes).
If you want to generate a set of helix sequences based on a set of junction sequences and a 'base' sequence with different lengths/positions within the helix, you can use the script:
python ~/JunctionLibrary/make_helix_seqs.py -h
-h, --help show this help message and exit
-c HELIX_CONTEXT, --helix_context HELIX_CONTEXT
side1 of helix
-m MODE, --mode MODE mode in which to insert junctions. Can be "along" =
all possible locations in 8, 9, 10, 11 bp helices, or
"standard" = one length in 8, 11, and three lengths in
9 and 10 bp
-l LENGTHS [LENGTHS ...], --lengths LENGTHS [LENGTHS ...]
-o OFFSETS [OFFSETS ...], --offsets OFFSETS [OFFSETS ...]
-r JUNCTION_SEQS, --junction_seqs JUNCTION_SEQS
side1 and side2 of the junction sequence
-f FLANK_TO_ADD, --flank_to_add FLANK_TO_ADD
bases to add above and below junction seq.
default="U_U"
-out OUT_FILE, --out_file OUT_FILE
file to save output
This script allows you to use one of the default options on where to incorporate the junction ('along'), but you can also define. For example:
python ~/JunctionLibrary/make_helix_seqs.py -c seq_params/helix_seqs_2.dat -r seq_params/junction_seqs_TAR.dat -l 10 -o 0
will put the junctions in 'junction_seqs_TAR.dat' into the center position of the length 10 sequence of each of the contexts given in 'seq_params/helix_seqs.dat'.
If run as:
python ~/JunctionLibrary/make_helix_seqs.py -c seq_params/helix_seqs_2.dat -r seq_params/junction_seqs_TAR.dat -l 9,10,10,11 -o 0,-1,1,0
will put the junctions in the center position of length 9 bp helix and the length 11 bp helix, as well as two positions in the length 10 helix.
On the other hand:
python ~/JunctionLibrary/make_helix_seqs.py -c seq_params/helix_seqs_2.dat -r seq_params/junction_seqs_TAR.dat -m along
will put the junctions in all possible positions in the length 8, 9, 10, and 11 bp helices.