Commit e0782ad4 authored by Roman Sarrazin-Gendron's avatar Roman Sarrazin-Gendron
Browse files

Last removals

parent 176c6f88
......@@ -8,6 +8,9 @@ Three python scripts are required to run BayesPairing.
PARSE_SEQUENCES : run BayesPairing
parse_sequences.py is used to run BayesPairing on a set of sequences, to parse them for some set of motifs.
BayesPairing comes with a default dataset of 40 modules, extracted from datasets generated by CARNAVAL. The first 20 are long range and the second 20, short.
This dataset is named 'all_carnaval'.
The following arguments can be used to call it. only -seq is required.
--verbose increase output verbosity
-sm SM sample more minor sequences by making the regex more flexible
......@@ -28,7 +31,8 @@ parse_sequences will return the score and the position of insertion of the N bes
MODULE_FROM_DESC : create your own module and build your own dataset
MODULE_FROM_DESC : create your own module and build your own dataset. NOTE : requires GhostScript and latex.
Because MODULE_FROM_DESC is harder to install than other scripts, it was pre-run on the default dataset, so if you want to use that one, all the logos and graphs can already be found in the folder 'Graphs'
module_from_desc.py is used to build a dataset to use as the -d option for parse_sequences.py
you can call it with a .DESC file, which describes a graph, and a .fasta file of sequences matching this structure.
......
GAACCGCGAAAGCGGUUCCACGACGAUACUUAUUUCCUUUGAUCGUCGUUAUUACUGGCUUCGGCCACAAAGGAGA
.((((((((....((....................)).....)))))))).....((((....))))......... (-11.40)
.((((((((...,({.....,,..,,.........},.....)))))))).....((((....))))......... [-12.97]
.((((((((.................................)))))))).....((((....))))......... { -9.90 d=4.66}
frequency of mfe structure in ensemble 0.0779578; ensemble diversity 7.81
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: ViennaRNA-2.4.1
%%CreationDate: Sun Jan 7 23:18:28 2018
%%Title: RNA Secondary Structure Plot
%%BoundingBox: 0 0 700 700
%%DocumentFonts: Helvetica
%%Pages: 1
%%EndComments
%Options:
% to switch off outline pairs of sequence comment or
% delete the appropriate line near the end of the file
%%BeginProlog
/RNAplot 100 dict def
RNAplot begin
/fsize 14 def
/outlinecolor {0.2 setgray} bind def
/paircolor {0.2 setgray} bind def
/seqcolor {0 setgray} bind def
/cshow { dup stringwidth pop -2 div fsize -3 div rmoveto show} bind def
/min { 2 copy gt { exch } if pop } bind def
/max { 2 copy lt { exch } if pop } bind def
/arccoords { % i j arccoords
% puts optimal x1 y1 x2 y2 coordinates used in bezier curves from i to j
% onto the stack
dup 3 -1 roll dup 4 -1 roll lt dup dup 5 2 roll {exch} if
dup 3 -1 roll dup 3 -1 roll exch sub 1 sub dup
4 -2 roll 5 -1 roll {exch} if 4 2 roll
sequence length dup 2 div exch 3 1 roll lt
{exch 5 -1 roll pop 4 -2 roll exch 4 2 roll}
{ 4 2 roll 5 -1 roll dup 6 1 roll {exch} if
4 -2 roll exch pop dup 3 -1 roll dup 4 1 roll
exch add 4 -1 roll dup 5 1 roll sub 1 sub
5 -1 roll not {4 -2 roll exch 4 2 roll} if
}ifelse
% compute the scalingfactor and prepare (1-sf) and sf*r
2 mul exch cpr 3 1 roll div dup
3 -1 roll mul exch 1 exch sub exch
% compute the coordinates
3 -1 roll 1 sub coor exch get aload pop % get coord for i
4 -1 roll dup 5 1 roll mul 3 -1 roll dup 4 1 roll add exch % calculate y1
4 -1 roll dup 5 1 roll mul 3 -1 roll dup 4 1 roll add exch % calculate x1
5 -1 roll 1 sub coor exch get aload pop % get coord for j
% duplicate j coord
dup 3 -1 roll dup 4 1 roll exch 8 2 roll
6 -1 roll dup 7 1 roll mul 5 -1 roll dup 6 1 roll add exch % calculate y2
6 -1 roll mul 5 -1 roll add exch % calculate x2
6 -2 roll % reorder
} bind def
/drawoutline {
gsave outlinecolor newpath
coor 0 get aload pop 0.8 0 360 arc % draw 5' circle of 1st sequence
currentdict /cutpoint known % check if cutpoint is defined
{coor 0 cutpoint getinterval
{aload pop lineto} forall % draw outline of 1st sequence
coor cutpoint 1 add get aload pop
2 copy moveto 0.8 0 360 arc % draw 5' circle of 2nd sequence
coor cutpoint 1 add coor length cutpoint 1 add sub getinterval
{aload pop lineto} forall} % draw outline of 2nd sequence
{coor {aload pop lineto} forall} % draw outline as a whole
ifelse
stroke grestore
} bind def
/drawpairs {
paircolor
0.7 setlinewidth
[9 3.01] 9 setdash
newpath
pairs {aload pop
currentdict (cpr) known
{ exch dup
coor exch 1 sub get aload pop moveto
exch arccoords curveto
}
{ coor exch 1 sub get aload pop moveto
coor exch 1 sub get aload pop lineto
}ifelse
} forall
stroke
} bind def
% draw bases
/drawbases {
[] 0 setdash
seqcolor
0
coor {
aload pop moveto
dup sequence exch 1 getinterval cshow
1 add
} forall
pop
} bind def
/init {
/Helvetica findfont fsize scalefont setfont
1 setlinejoin
1 setlinecap
0.8 setlinewidth
% find the coordinate range
/xmax -1000 def /xmin 10000 def
/ymax -1000 def /ymin 10000 def
coor {
aload pop
dup ymin lt {dup /ymin exch def} if
dup ymax gt {/ymax exch def} {pop} ifelse
dup xmin lt {dup /xmin exch def} if
dup xmax gt {/xmax exch def} {pop} ifelse
} forall
/size {xmax xmin sub ymax ymin sub max} bind def
/width {xmax xmin sub} bind def
/height {ymax ymin sub} bind def
10 10 translate
680 size 10 add div dup scale
size width sub width xmin sub xmax sub add 2 div 5 add
size height sub height ymin sub ymax sub add 2 div 5 add
translate
} bind def
end
%%EndProlog
RNAplot begin
% data start here
/sequence (\
GAACCGCGAAAGCGGUUCCACGACGAUACUUAUUUCCUUUGAUCGUCGUUAUUACUGGCUUCGGCCACAAAGGAGA\
) def
/coor [
[55.46379089 94.23312378]
[58.34573746 83.21746826]
[45.56413651 75.36695099]
[32.78253555 67.51643372]
[20.00093269 59.66590881]
[7.21933079 51.81539154]
[-5.56227112 43.96487045]
[-18.34387207 36.11435318]
[-31.12547493 28.26383209]
[-45.44218445 36.26150131]
[-61.74678040 36.03223801]
[-75.67334747 27.73031998]
[-83.53917694 13.65921974]
[-83.31844330 -2.36674738]
[-96.40962219 -9.68939018]
[-107.18956757 0.89217132]
[-120.51467133 8.00682735]
[-135.30471802 11.07782364]
[-150.36076355 9.85620880]
[-164.46226501 4.44101286]
[-176.46607971 -4.72877741]
[-185.39912415 -16.90980911]
[-190.53721619 -31.11462021]
[-191.46385193 -46.19168854]
[-188.10389709 -60.91878891]
[-180.72973633 -74.10205078]
[-169.93917847 -84.67278290]
[-156.60693359 -91.77404785]
[-141.81379700 -94.83018494]
[-126.75899506 -93.59344482]
[-112.66294098 -88.16408539]
[-100.66834259 -78.98223877]
[-91.74754333 -66.79224396]
[-86.62372589 -52.58227539]
[-85.71223450 -37.50428391]
[-89.08698273 -22.78056717]
[-75.99580383 -15.45792389]
[-64.60898590 -23.26702881]
[-50.89340973 -25.35792351]
[-37.56940842 -21.25720596]
[-27.30520439 -11.72536087]
[-22.18261528 1.38352621]
[-23.27495384 15.48223019]
[-10.49335289 23.33275032]
[2.28824878 31.18326950]
[15.06984997 39.03379059]
[27.85145187 46.88430786]
[40.63305283 54.73482895]
[53.41465378 62.58535004]
[66.19625854 70.43586731]
[81.46974182 59.09326935]
[100.06877899 55.09202576]
[118.65547180 59.15022278]
[133.89414978 70.53955078]
[143.04998779 87.21601868]
[144.47982788 106.18677521]
[158.78302002 110.70546722]
[173.08621216 115.22415924]
[187.38941956 119.74285126]
[203.27630615 115.67610168]
[214.54664612 127.58876801]
[209.60647583 143.22612000]
[193.53781128 146.50178528]
[182.87071228 134.04605103]
[168.56752014 129.52735901]
[154.26432800 125.00866699]
[139.96113586 120.48997498]
[133.52333069 129.88172913]
[124.93039703 137.35246277]
[114.73476410 142.42190552]
[103.59186554 144.76416016]
[92.21805573 144.22863770]
[81.34452820 140.84977722]
[71.67031097 134.84480286]
[63.81733704 126.59973145]
[58.29044724 116.64464569]
] def
/pairs [
[2 50]
[3 49]
[4 48]
[5 47]
[6 46]
[7 45]
[8 44]
[9 43]
[14 37]
[15 36]
[56 67]
[57 66]
[58 65]
[59 64]
] def
init
% switch off outline pairs or bases by removing these lines
drawoutline
drawpairs
drawbases
% show it
showpage
end
%%EOF
GCUUAUACAGGGUAGCAUAAUGGGCUACUGACCCCGCCUUCAAACCUAUUUGGAGACUAUAAGU
\ No newline at end of file
GAACCGCGAAAGCGGUUCCACGACGAUACUUAUUUCCUUUGAUCGUCGUUAUUACUGGCUUCGGCCACAAAGGAGA
.(((((...............................xx......)))))..........................
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment