Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SINGE shell script and separation of GLG_Instance and Aggregate functions #37

Merged
merged 52 commits into from
Sep 22, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
7461848
Enable GNU format for input
atuldeshpande Aug 14, 2019
83975e5
standalone SCINGE shell
atuldeshpande Aug 15, 2019
00ef6c0
adding hyperparameters
atuldeshpande Aug 18, 2019
365087e
Change config inputs to single hyphen
atuldeshpande Aug 19, 2019
cd92411
reverting to old tf.mat
atuldeshpande Aug 19, 2019
35612bb
Temporarily restore old files to assist merge
agitter Aug 19, 2019
f7a227a
Merge with master
agitter Aug 19, 2019
a696642
Rename SCINGE to SINGE
agitter Aug 19, 2019
6482978
Input hyperparameter file through command line
atuldeshpande Aug 20, 2019
a60647d
Rename hyperparameters files
agitter Aug 20, 2019
c9d3776
Move Docker test script
agitter Aug 20, 2019
8fa6f45
Rename script and reorder args
agitter Aug 20, 2019
b3467da
Remove wrapper file and readme for old binary
agitter Aug 21, 2019
470f307
Update compile script for both binaries
agitter Aug 21, 2019
1c077ef
Switch to standalone script for testing
agitter Aug 21, 2019
4c42375
Restore and rename SCINGE_Example.m
agitter Aug 21, 2019
ae10ed6
Make script executable again
agitter Aug 21, 2019
c3d7222
Fix compile script
agitter Aug 21, 2019
6cf4b32
Add output files from compile script
agitter Aug 21, 2019
060a38a
Update binary version in Dockerfile
agitter Aug 21, 2019
241197d
Merge branch 'config_changes' of https://github.com/gitter-lab/SCINGE…
agitter Aug 21, 2019
ffb8844
Make test script executable
agitter Aug 21, 2019
d41ca31
Add full MATLAB runtime path
agitter Aug 21, 2019
33960a2
Take MATLAB runtime path as argument
agitter Aug 23, 2019
a5d2d11
Accept SINGE output directory as argument
agitter Aug 23, 2019
a2aeb8c
Test output from compiled SINGE_Example
agitter Aug 23, 2019
a230f5b
Ignore compiled binaries
agitter Aug 23, 2019
c3861c5
Compile SINGE including SINGE_Example
agitter Aug 23, 2019
c688c97
Fix script name
agitter Aug 23, 2019
7b826de
Changes to SINGE_Example and SINGE
atuldeshpande Sep 3, 2019
9641eb6
SINGE.m touchups
agitter Sep 3, 2019
17e90c9
Update test hyperparameters file formatting
agitter Sep 3, 2019
f3297c2
Fixed hyperparameter parsing
atuldeshpande Sep 7, 2019
ecc707f
Update compiled version in Dockerfile
agitter Sep 7, 2019
c0c9554
Bug fix for hyperparameter parsing
atuldeshpande Sep 7, 2019
d1dd683
Merge branch 'config_changes' of github.com:gitter-lab/SCINGE into co…
atuldeshpande Sep 10, 2019
e32ef2e
Update compiled version in Dockerfile
agitter Sep 10, 2019
a44642b
Copy SINGE_Example to SINGE_Test for testing
agitter Sep 14, 2019
dde4885
Compile SINGE_Test
agitter Sep 14, 2019
ba20cad
Update Dockerfile
agitter Sep 14, 2019
35dd010
Update relative paths
agitter Sep 14, 2019
0852503
Update Dockerfile
agitter Sep 14, 2019
5b594f0
Update argument syntax
agitter Sep 14, 2019
d34f133
Update README.md
atuldeshpande Sep 14, 2019
0e8cf7b
Describe how to run using Docker in readme
agitter Sep 17, 2019
d3918ac
Update README.md
atuldeshpande Sep 18, 2019
2bb1100
Bug fix and update default hyperparameter list
atuldeshpande Sep 20, 2019
a86ea29
update standalone
atuldeshpande Sep 20, 2019
99d07bd
Update dockerfile
agitter Sep 22, 2019
a95a87d
Update readme
agitter Sep 22, 2019
eb4fb0d
Update hyperparameters comments
agitter Sep 22, 2019
27fb3a6
Update dockerfile
agitter Sep 22, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions code/Aggregate.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
function Aggregate(genefile,Data,outdir)
agitter marked this conversation as resolved.
Show resolved Hide resolved
load(genefile);

Str = Data;
agitter marked this conversation as resolved.
Show resolved Hide resolved
Str(Str=='.') = 'p';

lind = max(max(strfind(Str,filesep)),0);
if isempty(lind)
lind = 0;
end
mind = length(Str);

Str = Str(lind+1:mind);
Agg = Modified_Borda_Aggregation(Str,outdir);

ranked_edges = adjmatrix2edgelist(Agg,gene_list);
[influence,ind] = sort(sum(Agg,2),'descend');
gene_influence = [cell2table(gene_list(ind)) array2table(influence)];
gene_influence.Properties.VariableNames{1} = 'Gene_Name';
ranked_edgesw = ranked_edges;
ranked_edgesw.SCINGE_Score = floor(ranked_edgesw.SCINGE_Score*10^5)/10^5;
gene_influencew = gene_influence;
gene_influencew.influence = floor(gene_influencew.influence*10^5)/10^5;
writetable(ranked_edgesw,fullfile(outdir,'SCINGE_Ranked_Edge_List.txt'),'WriteVariableNames',true,'WriteRowNames',false,'Delimiter','\t');
writetable(gene_influencew,fullfile(outdir,'SCINGE_Gene_Influence.txt'),'WriteVariableNames',true,'WriteRowNames',false,'Delimiter','\t');
24 changes: 3 additions & 21 deletions code/SCINGE.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,13 @@
% Outputs:
% ranked_edges = ranked list of gene interactions with corresponding SCINGE scores
% gene_influence = ranked lists of regulators (genes) with corresponding SCINGE influence
SCINGE_version = '0.2.0';
SCINGE_version = '0.3.0';
display(SCINGE_version);
for rep = 1:num_replicates
for ii = 1:length(param_list)
GLG_Instance(Data,'lambda',param_list{ii}.lambda,'dT',param_list{ii}.dT,'num_lags',param_list{ii}.num_lags,'kernel_width',param_list{ii}.kernel_width,'prob_zero_removal',param_list{ii}.prob_zero_removal,'replicate',rep,'ID',param_list{ii}.ID,'outdir',outdir,'family',param_list{ii}.family,'prob_remove_samples',param_list{ii}.prob_remove_samples,'date',param_list{ii}.date);
GLG_Instance(Data,'--lambda',param_list{ii}.lambda,'--dT',param_list{ii}.dT,'--num_lags',param_list{ii}.num_lags,'--kernel_width',param_list{ii}.kernel_width,'--prob_zero_removal',param_list{ii}.prob_zero_removal,'--replicate',rep,'--ID',param_list{ii}.ID,'--outdir',outdir,'--family',param_list{ii}.family,'--prob_remove_samples',param_list{ii}.prob_remove_samples,'--date',param_list{ii}.date);
atuldeshpande marked this conversation as resolved.
Show resolved Hide resolved
end
end
Str = Data;
Str(Str=='.') = 'p';

lind = max(max(strfind(Str,filesep)),0);
mind = length(Str);
if isempty(mind)||(mind<lind)
mind = length(Str);
end
Str = Str(lind+1:mind);
Agg = Modified_Borda_Aggregation(Str,outdir);
Aggregate(gene_list,Data,outdir);

ranked_edges = adjmatrix2edgelist(Agg,gene_list);
[influence,ind] = sort(sum(Agg,2),'descend');
gene_influence = [cell2table(gene_list(ind)) array2table(influence)];
gene_influence.Properties.VariableNames{1} = 'Gene_Name';
ranked_edgesw = ranked_edges;
ranked_edgesw.SCINGE_Score = floor(ranked_edgesw.SCINGE_Score*10^5)/10^5;
gene_influencew = gene_influence;
gene_influencew.influence = floor(gene_influencew.influence*10^5)/10^5;
writetable(ranked_edgesw,fullfile(outdir,'SCINGE_Ranked_Edge_List.txt'),'WriteVariableNames',true,'WriteRowNames',false,'Delimiter','\t');
writetable(gene_influencew,fullfile(outdir,'SCINGE_Gene_Influence.txt'),'WriteVariableNames',true,'WriteRowNames',false,'Delimiter','\t');
8 changes: 8 additions & 0 deletions code/parseParams.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
function params = parseParams(Data,varargin)
for ii = 1:length(varargin)
temp = varargin{ii};
if numel(temp)>2
if strcmpi(temp(1:2),'--')
varargin{ii} = temp(3:end);
end
end
end
p = inputParser;
def_lambda = 0.01;
def_dT = 1;
Expand Down
Binary file modified data1/tf.mat
Binary file not shown.
10 changes: 10 additions & 0 deletions standalone_SCINGE.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
agitter marked this conversation as resolved.
Show resolved Hide resolved
Data=$1
outdir=$3
gene_list=$2
hypefile=hyperparameters.txt
agitter marked this conversation as resolved.
Show resolved Hide resolved
while read arg||[ -n "$arg" ]; do
./run_GLG_Instance.sh v94 $Data --outdir $outdir $arg
agitter marked this conversation as resolved.
Show resolved Hide resolved
done < $hypefile

./run_Aggregate.sh v94 $gene_list $Data $outdir