Skip to content

Commit

Permalink
add help for rna_structure and output_Varna
Browse files Browse the repository at this point in the history
  • Loading branch information
t47io committed Apr 19, 2016
1 parent f0dad89 commit b28aaba
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 5 deletions.
26 changes: 25 additions & 1 deletion Scripts/RNAstructure/rna_structure.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,32 @@
% [structure, bpp, SHAPE_out ] = rna_structure( sequence, area_shape, offset, seqpos, EX, NUM_BOOTSTRAP, cmd...
% temperature, shape_intercept, shape_slope, maxdist);
%
% make sure to set your path in get_exe_dir.m
% Run RNAstructure data-drive secstr prediction with bootstrapping.
% **Make sure to set your path in get_exe_dir.m
%
% [Input]
% sequence Required RNA sequence
% area_shape Optional 1D bonus data, same length as sequence
% offset Optional Sequence numbering offset
% seqpos Optional Sequence position used to filter area_shape
% EX Optional 2D bonus data, same dimension as sequence
% NUM_BOOTSTRAP Optional Number of bootstrap runs, in addition to run with original data. Default 0 (no bootstrap).
% cmd_pk Optional RNAstructure executable flag: 0 for Fold, 1 for ShapeKnot. Default 0.
% area_dms Optional 1D bonus data for DMS
% tempertature Optional Folding temperature, use Celcius. Default 24.
% shape_intercept Optional 1D bonus SHAPE intercept, default based on RNAstructure version
% shape_slope Optional 1D bonus SHAPE slope, default based on RNAstructrue version
% maxdist Optional Max pairing distance, default none
%
% [Output]
% structure Prediction result secstr (using original data, no bootstrap)
% bpp Base-pairing probability matrix, summarized from bootstraping runs into percentages.
% SHAPE_out Filtered 1D bonus data
%
% by T47, 2015
%

if nargin == 0; help( mfilename ); return; end;

if ~exist( 'area_shape','var' ); area_shape = []; end;
if ~exist( 'area_dms','var' ); area_dms = []; end;
Expand Down
40 changes: 36 additions & 4 deletions Scripts/VARNA/output_varna_html.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,39 @@
function [special_base_pairs, special_colors] = output_varna_html(varna_file, sequence, display_structure, native_structure, modeled_structure, offset, mutpos, crystpos, shape, bpp, color_mode)

if ~exist('mutpos','var') || isempty(mutpos); mutpos = [1:length(sequence)] + offset; end;
if ~exist('crystpos','var') || isempty(crystpos); crystpos = [1:length(sequence)] + offset; end;
function [special_base_pairs, special_colors] = output_varna_html(varna_file, sequence, display_structure, native_structure, modeled_structure, offset, mutpos, crystpos, shape, bpp, color_mode)
% [special_base_pairs, special_colors] = output_varna_html( ...
% varna_file, sequence, display_structure, native_structure, modeled_structure,
% offset, mutpos, crystpos, shape, bpp, color_mode);
%
% Generate HTML file with VARNA applet for RNA secstr visualziation.
% **Make sure to set your path in get_varna.m
%
% [Input]
% varna_file Required HTML file name
% sequence Required RNA sequence for display
% display_structure Required RNA secstr for display
% native_structure Optional Reference/native secstr used for secstr comparison.
% modeled_structure Optional Predicted/new secstr used for secstr comparison.
% offset Optional Sequence numbering offset, default 0.
% mutpos Optional [?]
% crystpos Optional [?]
% shape Optional SHAPE reactivity profile for nucleotide coloring, default none.
% bpp Optional Base-pairing probability matrix for helix-wise confidence score.
% color_mode Optional Secstr comparison line color set, default 1.
%
% [Output]
% special_base_pairs Index of base-pairs that differ between native_structure and modeled_structure
% special_colors Secstr comparison color set
%
% by T47, 2013-2015
%

if nargin == 0; help( mfilename ); return; end;

if ~exist('native_structure','var') || isempty(native_structure); native_structure = display_structure; end;
if ~exist('modeled_structure','var') || isempty(modeled_structure); modeled_structure = display_structure; end;

if ~exist('offset','var') || isempty(offset); offset = 0; end;
if ~exist('mutpos','var') || isempty(mutpos); mutpos = [1:length(sequence)] + offset; end;
if ~exist('crystpos','var') || isempty(crystpos); crystpos = [1:length(sequence)] + offset; end;
if ~exist('color_mode', 'var') || isempty(color_mode); color_mode = 1; end;

mutpos = sort(mutpos);
Expand Down

0 comments on commit b28aaba

Please sign in to comment.