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

Reads filtration change seq length + RF model update #5

Open
wants to merge 363 commits into
base: controlled_shuffles
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
363 commits
Select commit Hold shift + click to select a range
883f75a
change the list of colors
yael1994 Apr 27, 2021
96faaa2
last changes
yael1994 May 1, 2021
f63417a
change the default values
yael1994 May 1, 2021
9b99cab
names and spaces fix
yael1994 May 4, 2021
06ed787
swap values
yael1994 May 4, 2021
106a3ae
fix comments
yael1994 May 11, 2021
83eb49c
Added log scale to unite heatmap tool
shacharmo May 19, 2021
4ea4fd6
Merge pull request #25 from Webiks/tool_all_data_RF
shacharmo May 19, 2021
63112a8
Fixed typeos
shacharmo May 19, 2021
37ad77b
add json file for read filteration phase
yael1994 May 19, 2021
3609553
changes in the cmd
yael1994 May 19, 2021
9b1476f
check the scema of the json file without load twice
yael1994 May 19, 2021
6db177b
Merge branch 'controlled_shuffles_tools' into validation_files
yael1994 May 19, 2021
9525e37
Merge branch 'reads_filtration_change_seq_length' into RF_parallel
yael1994 May 19, 2021
f29afc4
Merge pull request #20 from Webiks/RF_parallel
shacharmo May 19, 2021
220f138
call the json valid scema from load table
yael1994 May 20, 2021
ce5e848
fix conflict
yael1994 May 20, 2021
074abf4
Fixed file validations including imports
shacharmo May 23, 2021
36b2073
Merge pull request #14 from Webiks/validation_files
shacharmo May 23, 2021
8816ab8
part 1 cross exp
yael1994 May 23, 2021
16107f0
change the place of file AWS stop machines from tools to auxiliaries
yael1994 May 23, 2021
c45e662
Merge branch 'controlled_shuffles_tools' into change_place_stop_machines
yael1994 May 23, 2021
b5a2f3b
support mapitope
yael1994 May 23, 2021
40cc915
remove import src_dir
yael1994 May 25, 2021
f7ef3d9
Merge branch 'change_place_stop_machines' of https://github.com/Webik…
yael1994 May 25, 2021
1a6a549
Merge pull request #27 from Webiks/change_place_stop_machines
shacharmo May 25, 2021
c38eabf
phase 1 and 2
yael1994 May 26, 2021
2a3cc96
commit
yael1994 May 26, 2021
5063b12
Merge branch 'controlled_shuffles_tools' of https://github.com/Webiks…
yael1994 May 26, 2021
15edfa9
commit
yael1994 May 26, 2021
4996d11
fix conflicts for merge
yael1994 May 26, 2021
c85cfe8
change the end line from \r\n to \n
yael1994 May 27, 2021
ecc2114
dict structure for params
yael1994 May 27, 2021
9a9edac
remove spaces and return the matitope
yael1994 May 27, 2021
c500d54
add amd remove lines
yael1994 May 27, 2021
49c5e83
pass check_files_valid and remove points in the end of help
yael1994 May 30, 2021
bbc4f8c
Merge branch 'reads_filtration_change_seq_length' into controlled_shu…
yael1994 May 30, 2021
fcb012d
first phase ready
yael1994 May 30, 2021
46e47eb
fix conflict
yael1994 May 30, 2021
2fafa25
add new param
yael1994 May 30, 2021
d3719ba
change the place of parameters
yael1994 May 30, 2021
0e15cc3
fix spaces
yael1994 May 30, 2021
939f2e5
Merge pull request #28 from Webiks/controlled_shuffles_tools
shacharmo May 30, 2021
48123be
create new function process_params
yael1994 May 30, 2021
a46b15a
fix conflict after new merge
yael1994 May 30, 2021
0a30988
add validation for json file
yael1994 May 31, 2021
b82c8c5
multi runs of inference phase
yael1994 May 31, 2021
61f1f0f
add the changes of the merges
yael1994 May 31, 2021
d9409f0
add validation for json file
yael1994 May 31, 2021
a4e05ba
test the schema for validation json file
yael1994 Jun 1, 2021
75be8a7
change the schema - name with +
yael1994 Jun 1, 2021
c7e114c
add more params to the dictinary and change the name defualt
yael1994 Jun 1, 2021
62300bb
remove new output file
yael1994 Jun 1, 2021
93c23e2
remove one dictionary
yael1994 Jun 1, 2021
0d19f9d
check all the new code
yael1994 Jun 3, 2021
c309c96
fix the change request problem
yael1994 Jun 4, 2021
3d38c2d
start phase 3 cross exp
yael1994 Jun 4, 2021
93bfb13
Merge pull request #31 from Webiks/test_before_upload
shacharmo Jun 6, 2021
12a8155
fix new conflict after test the main code
yael1994 Jun 7, 2021
c4188fa
small changes - spaces and spelling
yael1994 Jun 7, 2021
54f01b6
update pip and packages
yael1994 Jun 7, 2021
8a4b918
add execute for entrypoint
yael1994 Jun 7, 2021
f173d99
change the place of fuction change key name
yael1994 Jun 8, 2021
4e9cfab
fix the conflict after merge test_code
yael1994 Jun 8, 2021
50b23ff
add stop machine to the pipeline
yael1994 Jun 9, 2021
26daa0c
change the order of the parameters
yael1994 Jun 9, 2021
d086970
add new params
yael1994 Jun 10, 2021
66dee99
Merge pull request #32 from Webiks/update_Dockerfile
shacharmo Jun 10, 2021
9ee04b4
Merge pull request #33 from Webiks/stop_machines_by_manager
shacharmo Jun 10, 2021
2794f09
function for score hits and values
yael1994 Jun 14, 2021
2f68454
order of function
yael1994 Jun 14, 2021
6d814ed
create function that add the score to DB
yael1994 Jun 17, 2021
b73bac0
run multi exp
yael1994 Jun 17, 2021
84fd325
function remove item that already scan
yael1994 Jun 20, 2021
be01278
change the way to call run_first_phase
yael1994 Jun 20, 2021
8b831ba
change the way call to infer motifs
yael1994 Jun 20, 2021
a552bad
fix conflict in igomeprofiling
yael1994 Jun 20, 2021
09b865b
fix conflict in igomeprofiling
yael1994 Jun 20, 2021
b6700e9
create a cross exp file markdwon
yael1994 Jun 20, 2021
10b3b87
spaces in explain file
yael1994 Jun 21, 2021
896bf1e
change the way to call build classifier
yael1994 Jun 21, 2021
06bb5e1
scanning with many exp
yael1994 Jun 23, 2021
9a161a2
Change the name of call the function that run infer motifs
yael1994 Jun 23, 2021
1530b27
phase 3 cross with 2 exp
yael1994 Jun 26, 2021
a4de817
add predict
yael1994 Jun 26, 2021
669fc96
merge cross phase 1 with 3
yael1994 Jun 26, 2021
c8e6e17
merge phase 2 to phase 3
yael1994 Jun 26, 2021
0f41296
test in phase 3 the valid of the structure sample2bc
yael1994 Jun 28, 2021
ffc62c2
multiply hits in factor
yael1994 Jun 30, 2021
cf898cd
use factor in pipeline
yael1994 Jun 30, 2021
b503192
add valid path pipeline
yael1994 Jun 30, 2021
4d36601
add factor flag for pval
yael1994 Jun 30, 2021
1875f52
remove print
yael1994 Jul 1, 2021
f162fe5
index of done path was out of index
yael1994 Jul 1, 2021
a4894a8
Merge pull request #34 from Webiks/fix_model_fitting_run
shacharmo Jul 1, 2021
be5628d
use variable in module wraper in model fitting instead only numbers
yael1994 Jul 1, 2021
0a856a1
after tests
yael1994 Jul 1, 2021
730a5ea
fix merge conflict all phase cross
yael1994 Jul 1, 2021
1c2b920
Fix problems in PR
yael1994 Jul 2, 2021
a457b11
remove duplicate function
yael1994 Jul 3, 2021
b8b2f45
multiply factor after calculate values - shuffles
yael1994 Jul 3, 2021
ac47c43
multiply factor after calculate value - pval
yael1994 Jul 3, 2021
377dcc3
determine factor as true by default
yael1994 Jul 3, 2021
4434df5
merge normalization of hits
yael1994 Jul 3, 2021
268c132
fix after test run
yael1994 Jul 3, 2021
f879092
changes of names and function rpm factor
yael1994 Jul 4, 2021
a221058
create function has value in parser params and change user factor to …
yael1994 Jul 4, 2021
ffd0373
Merge pull request #35 from Webiks/cross_exp_phase3
shacharmo Jul 6, 2021
8821697
change the name of combine and bc_sample_names
yael1994 Jul 7, 2021
ffce56d
Merge pull request #36 from Webiks/split_bc_sample_name
shacharmo Jul 7, 2021
9dd6402
case for times that don't input a config file
yael1994 Jul 7, 2021
8fb3775
Merge pull request #37 from Webiks/validation_files_bug
shacharmo Jul 7, 2021
e6e7313
name of sample2bc path
yael1994 Jul 8, 2021
fb3b89d
remove print
yael1994 Jul 8, 2021
a73a838
Merge pull request #38 from Webiks/fix_cross_issues
shacharmo Jul 8, 2021
196c8e1
chagne postion of two params and send the right config files
yael1994 Jul 10, 2021
a300475
Merge pull request #39 from Webiks/test_cross_code
shacharmo Jul 11, 2021
0e2065a
extract params for cutoffs
yael1994 Jul 12, 2021
a1e9f0e
remove not use params
yael1994 Jul 12, 2021
a7fceca
specific name of models features
yael1994 Jul 12, 2021
9f156fd
Merge pull request #41 from Webiks/predict_name_models
shacharmo Jul 13, 2021
9a8c26c
change the name of params and the help information
yael1994 Jul 13, 2021
136ed61
change the help of cutoff_random_peptitdes_percentile
yael1994 Jul 13, 2021
014c2f7
Merge pull request #40 from Webiks/ectract_params_cutoffs
shacharmo Jul 14, 2021
e5e1cb5
remove peptides that longer than 12 in default
yael1994 Jul 15, 2021
fad4645
use unique rpm file in scanning shuffles
yael1994 Jul 15, 2021
5d57f2a
finish change scanning shuffle
yael1994 Jul 15, 2021
87d97e5
change the output log
yael1994 Jul 15, 2021
cc09003
finish improving the performance pval scanning
yael1994 Jul 16, 2021
3b31863
remove not necessary prints
yael1994 Jul 16, 2021
1bb048b
print the result of sequnce of hit per motif - shuffles
yael1994 Jul 16, 2021
6e099c8
finish to change the rpm factor from int to float
yael1994 Jul 16, 2021
c5c490d
add rpm to the print sequence
yael1994 Jul 16, 2021
ffd208a
write the seq that had hits pval
yael1994 Jul 16, 2021
5412078
add prints of sequences that had hits with motif
yael1994 Jul 17, 2021
dbe210a
Merge pull request #44 from Webiks/change_rpm_to_float_from_int
shacharmo Jul 19, 2021
56594bd
Merge pull request #42 from Webiks/remove_long_peptides
shacharmo Jul 19, 2021
9991c24
fix spelling error in filter reads
yael1994 Jul 20, 2021
ceecde4
Merge branch 'reads_filtration_change_seq_length' into log_sequence_h…
yael1994 Jul 21, 2021
8a7164d
Merge branch 'reads_filtration_change_seq_length' into performance_of…
yael1994 Jul 21, 2021
a13b5b9
Merge pull request #46 from Webiks/correction_spelling_error
shacharmo Jul 25, 2021
f5afd27
fix hits script
yael1994 Jul 28, 2021
f113eb6
fix pval scanning
yael1994 Jul 28, 2021
8c74231
Merge branch 'performance_of_scanning_with_rpm' of https://github.com…
yael1994 Jul 28, 2021
3379f13
after merge to main
yael1994 Jul 28, 2021
ca6fb1d
chagne the name of the parameter to use rpm faa file
yael1994 Aug 1, 2021
e9d0226
fix the condition for which faa file to use
yael1994 Aug 1, 2021
498b34b
add isSetCopy
yael1994 Aug 6, 2021
26368b4
fix all the conflicts for merge
yael1994 Aug 9, 2021
3d4ff15
print to file the peptide without over the text in the file
yael1994 Aug 9, 2021
7f88b33
create the factor to be float and not int
yael1994 Aug 9, 2021
99d0733
add check that add path for print the peptides
yael1994 Aug 10, 2021
2056f08
Merge pull request #43 from Webiks/performance_of_scanning_with_rpm
shacharmo Aug 11, 2021
0dfc01c
change the action of no rpm factor to be true
yael1994 Aug 12, 2021
b7f949a
Merge pull request #45 from Webiks/log_sequence_hits_with_motif
shacharmo Aug 12, 2021
c6ba6e5
find the positive motifs before RF
yael1994 Aug 26, 2021
a371fca
add normalization to hits
yael1994 Aug 26, 2021
6a1c5c9
flags for normaliztion
yael1994 Aug 27, 2021
bd33a84
remove unuse prints
yael1994 Aug 27, 2021
6b8fd6b
change spaces
yael1994 Aug 27, 2021
ebde5b4
change spaces
yael1994 Aug 27, 2021
968db73
fix the request changes
yael1994 Sep 5, 2021
11d66a6
log to shuffles
yael1994 Sep 5, 2021
bf60587
add positive negative for debugging
yael1994 Sep 5, 2021
c9d7bde
change the condition in find positive motifs
yael1994 Sep 5, 2021
f220a25
change last condition in find positive motifs
yael1994 Sep 5, 2021
91633b5
Merge pull request #47 from Webiks/motifs_statistical_calculation
shacharmo Sep 5, 2021
ff1a4e3
fix divide at zero and normalize not for pval and shuffles
yael1994 Sep 7, 2021
8c98920
add space
yael1994 Sep 19, 2021
59fb4ce
Merge pull request #48 from Webiks/positive_motifs_divide_zero
shacharmo Sep 20, 2021
9e975c1
close machines in the end of the run
yael1994 Oct 4, 2021
c078ae9
changes default of params in phase 3
yael1994 Oct 5, 2021
ac8f604
change the params in the igome pipeline
yael1994 Oct 5, 2021
412907d
add new file - changelog
yael1994 Oct 5, 2021
715381f
add all the releases to changelog
yael1994 Oct 5, 2021
54ae49f
explict the changes of the last release
yael1994 Oct 5, 2021
ab881ec
change the space in read filteration
yael1994 Oct 5, 2021
5cf49d6
spelling change in changelog file
yael1994 Oct 6, 2021
57108eb
Merge pull request #49 from Webiks/change_defaults
shacharmo Oct 6, 2021
289cb84
fix bug - drop the artifact motifs from datafrem
yael1994 Nov 2, 2021
7ac76c3
Merge pull request #50 from Webiks/fix_bug_positive_motifs_invalid_mix
shacharmo Nov 2, 2021
77cf787
add flush and delay to writting the results of models
yael1994 Nov 2, 2021
5da7bf3
change the length of libraries to be 14
yael1994 Nov 3, 2021
78012bc
rotate the y axis in heatmap and move the function to pipeline_auxili…
yael1994 Nov 3, 2021
81cf6d9
Merge pull request #53 from Webiks/rotate_labels_y_axis_heatmap
shacharmo Nov 4, 2021
410dc45
make the params externally controll
yael1994 Nov 4, 2021
d393030
remove prints to the consul
yael1994 Nov 4, 2021
fb762ac
Correction of spelling error
yael1994 Nov 5, 2021
ffab875
Merge pull request #51 from Webiks/rf_writting_to_feature_selection_s…
shacharmo Nov 7, 2021
9566126
Merge pull request #52 from Webiks/run_cutoff_length_14
shacharmo Nov 7, 2021
73b5f7e
add command line parameters
yael1994 Nov 11, 2021
2a01ec6
add verbose
yael1994 Nov 11, 2021
26f0610
spaces
yael1994 Nov 11, 2021
8a52235
Merge pull request #54 from Webiks/script_weblog
shacharmo Nov 14, 2021
7f3e33c
send the rpm factor for hits and divide unique rpm in rpm factor
yael1994 Jan 18, 2022
0afb1a8
working with long double in hits rpm
yael1994 Jan 19, 2022
55d033e
fix the bug - add unique count for the unique rpm file
yael1994 Jan 19, 2022
dd90a2a
remove spaces
yael1994 Jan 19, 2022
0dd9ff4
remove not use variable
yael1994 Jan 19, 2022
faa357d
remove spaces
yael1994 Jan 19, 2022
a68850d
remove f-string
yael1994 Jan 19, 2022
4a5a512
add variable for hit norm and true hit
yael1994 Jan 19, 2022
00977ae
fix the comments
yael1994 Jan 19, 2022
801cfd2
Merge pull request #56 from Webiks/hits_fix
shacharmo Jan 20, 2022
d9ccc07
remove the unique variable from the unique rpm
yael1994 Jan 20, 2022
5c7615d
rank method shuffles - rpm * hit meme shuffles
yael1994 Jan 20, 2022
dc8f9e9
pval - multiply rpm with hits of random sequences
yael1994 Jan 20, 2022
849d73f
remove prints
yael1994 Jan 20, 2022
5ab2579
add if the scanning use unique rpm faa or original faa
yael1994 Jan 23, 2022
420a3cb
Merge pull request #57 from Webiks/rpm_shuffles_hit
shacharmo Jan 23, 2022
7b680f4
add consensus to sorted file
yael1994 Apr 27, 2022
8bfb896
change default cluster algo mode from 0 to 1
yael1994 Apr 27, 2022
0f1c5e2
Merge pull request #58 from Webiks/default_cluster_algo_mode_change
shacharmo Apr 28, 2022
f45233b
Merge pull request #59 from Webiks/add_consensus_to_sorted_file
shacharmo Apr 28, 2022
be0e9d5
add script positive motifs for to module wraper
yael1994 May 1, 2022
0b74e0f
tool for change the meme file to the right version
yael1994 May 1, 2022
3f8a3a7
add spaces
yael1994 May 2, 2022
06fb562
Merge pull request #60 from Webiks/script_change_version_of_meme
shacharmo May 2, 2022
c327dbe
connect the positive motif script to pipeline
yael1994 May 2, 2022
906b8cc
remove normalization if the hits already normalize by rpm
yael1994 May 2, 2022
ffa9a27
sorted the cluster to combine by number of samples, unique peptides, rpm
yael1994 May 3, 2022
03b9271
add spaces
yael1994 May 3, 2022
09e5a4f
add flag of sample2group
yael1994 May 3, 2022
18b6ffd
script for join samples
yael1994 May 8, 2022
432c46a
add flag for type sort, more readability, user floor instead of round
yael1994 May 8, 2022
3a10996
change name of parameters and there explanation
yael1994 May 8, 2022
465df5a
fix the script by the new requests
yael1994 May 9, 2022
f5e7c38
remove the letter probability end
yael1994 May 9, 2022
723bedd
change the path of the wsl tutorial
yael1994 May 9, 2022
ad8f414
Merge pull request #63 from Webiks/input_change_script_meme
yael1994 May 9, 2022
2cf7db3
Merge pull request #64 from Webiks/path_install_wsl_readme
shacharmo May 9, 2022
83f34ca
Merge pull request #62 from Webiks/order_of_sort_motifs_BC
shacharmo May 18, 2022
d5fdf38
Merge pull request #61 from Webiks/connect_positive_motifs_to_pipeline
shacharmo May 18, 2022
53f57e1
group in the file barcode 2 sample
yael1994 May 19, 2022
57b0f05
remove not relevent function
yael1994 May 19, 2022
433dbca
fix spaces
yael1994 May 19, 2022
bbb9106
add new script for summary reads in one csv file
yael1994 May 19, 2022
02f23ec
add flag that keep cluster of BC that build from minimun number of sa…
yael1994 May 24, 2022
d632f0f
fix typo
yael1994 May 24, 2022
8c98b84
Merge pull request #67 from Webiks/flag_num_sample_build_cluster
shacharmo May 24, 2022
16fff30
Merge pull request #65 from Webiks/summary_log_csv
shacharmo May 24, 2022
b87fb41
Merge pull request #66 from Webiks/join_samples_to_groups
shacharmo May 24, 2022
5a595b5
changed the order of the samples
Roialfassi Jun 29, 2022
c8e19e7
Merge pull request #68 from Webiks/changeOrderMotifs
shacharmo Jun 29, 2022
f8e6295
Update unite_motifs_of_biological_condition.py
Roialfassi Jul 27, 2022
4a24542
Update worker_entrypoint.sh
Roialfassi Jul 27, 2022
082648c
updated entrypoint
Roialfassi Jul 31, 2022
aba7152
Update unite_motifs_of_biological_condition.py
Roialfassi Aug 1, 2022
5f6b79e
Update unite_motifs_of_biological_condition.py
Roialfassi Aug 1, 2022
7eed72c
Merge pull request #69 from Webiks/fixUniteMotifs
shacharmo Aug 1, 2022
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
Empty file modified .idea/misc.xml
100755 → 100644
Empty file.
Empty file modified .idea/modules.xml
100755 → 100644
Empty file.
Empty file modified .idea/src.iml
100755 → 100644
Empty file.
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Change Log
All notable changes to this project will be documented in this file.

### [1.2.0] - 2021-10-05

### Changes
- Changed default values of parameters:
- Phase 1:
- Changed maximum_length_required from 12 to 14
- Calculate rpm by default unless using flag no_calculate_rpm
- Phase 2:
- Changed aln_cutoff from 20 to 24
- Changed pcc_cutoff from 0.6 to 0.7
- Changed threshold from 0.5 to 0.6
- Changed word_length from 2 to 4
- Changed discard from 1 to 4
- Phase 3:
- Changed shuffles from 5 to 10
- Scanning with using rpm faa file unless using no_use_rpm_faa_scanning
- Log the hit sequences while scanning unless using no_output_sequences_scanning
- Changed the position of stop machines AWS to be after create done file.

### Added
- Added CHANGELOG file.

### [1.1.0] - 2021-09-22

### Added
- Added new file - positive motifs: keep only positive motifs before the random forest.

### [1.0.0] - 2021-08-01

- 🎉 first stable release!

4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ WORKDIR /app
COPY requirements.txt /app
RUN python3 -m venv .venv && \
. .venv/bin/activate && \
python -m pip install -U pip && \
pip install -U setuptools && \
pip install -U wheel && \
pip install -r requirements.txt

COPY . /app
Expand All @@ -38,5 +41,6 @@ RUN cd UnitePSSMs && \
g++ *.cpp -std=c++11 -O3 -o tfidf

ENV APP_FILE IgOmeProfiling_pipeline.py
RUN chmod +x entrypoint.sh
ENTRYPOINT ["./entrypoint.sh"]
CMD ["-h"]
2 changes: 1 addition & 1 deletion DockerfileWorker
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM webiks/igome-profile:latest

RUN chmod +x worker_entrypoint.sh
ENTRYPOINT ["./worker_entrypoint.sh"]
583 changes: 387 additions & 196 deletions IgOmeProfiling_pipeline.py

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions PSSM_score_Peptide/SEQ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@ string SEQ::getStringOfSeq(size_t pos) const {
return res;
}

SEQ::SEQ(string & SeqString, const string & SeqName, const double CopyNumber, alphabet& alph) : _Seq_Name(SeqName), _CopyNumber(CopyNumber), _alph(alph) {
SEQ::SEQ(string & SeqString, const string & SeqName, const double CopyNumber, alphabet& alph, bool isSetCopyNumber = true) : _Seq_Name(SeqName), _CopyNumber(CopyNumber), _alph(alph) {
for (size_t k = 0; k < SeqString.length(); ++k) {
char i = SeqString.at(k);
_Seq.push_back(alph._alphabetMap[i]);
}
setSeq_Type();
setCopyNmber();
if (isSetCopyNumber) {
setCopyNmber();
}
};
2 changes: 1 addition & 1 deletion PSSM_score_Peptide/SEQ.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class SEQ {
setSeq_Type();
setCopyNmber();
};
SEQ(string & SeqString, const string & SeqName, const double CopyNumber, alphabet& alph);
SEQ(string & SeqString, const string & SeqName, const double CopyNumber, alphabet& alph, bool isSetCopyNumber);

~SEQ(){};
void setName(const string name ){ _Seq_Name = name;}
Expand Down
15 changes: 10 additions & 5 deletions PSSM_score_Peptide/computePSSM_cutoffs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@ computePSSM_cutoffs::computePSSM_cutoffs(vector<PSSM> & PSSM_array,
size_t TotalNumberOfRandoSeq,
alphabet& alph,
const string & CutofsPerPSSM_FileName,
int totalMemes) :
int totalMemes,
double PercentOfRandomHitsPerPSSM,
int minLibraryLength,
int maxLibraryLength) :
_PSSM_array(PSSM_array),
_totalNumberOfRandoSeq(TotalNumberOfRandoSeq),
_alph(alph),
_CutofsPerPSSM_FileName(CutofsPerPSSM_FileName),
_totalMemes(totalMemes)
_totalMemes(totalMemes),
_PercentOfRandomHitsPerPSSM(PercentOfRandomHitsPerPSSM),
_minLibraryLength(minLibraryLength),
_maxLibraryLength(maxLibraryLength)
{
generateRandomPeptides();
computecCutoffsBasedOnRandomPeptides();
Expand All @@ -31,7 +37,7 @@ void computePSSM_cutoffs::generateRandomPeptides() {
size_t NumberOfRandoSeq = _totalNumberOfRandoSeq;
srand(931); // Set srand for generating random pepties // TODO set srand from input argument
map<string, randomPeptides>::iterator it = _randomPeptideDataSet.begin(); // use iteration and insert to add values to map
for (size_t length = 5; length <= 12; length++)
for (size_t length = _minLibraryLength; length <= _maxLibraryLength; length++)
{
randomPeptides tmp(_alph._aaFreq, NumberOfRandoSeq, length);
tmp.generateRandomSequences();
Expand Down Expand Up @@ -79,8 +85,7 @@ void computePSSM_cutoffs::computecCutoffsBasedOnRandomPeptides() {
// determin cutoff for each seq type and print to file
ofstream PSSM_Scores_Cutoff;
PSSM_Scores_Cutoff.open(_CutofsPerPSSM_FileName);

double PercentOfAcceptedPeptidesPerType = PercentOfRandomHitsPerPSSM / _totalMemes; // for each seq type the cutoff will be the percent of hits accepted for all PSSMs devided by the number of PSSMs
double PercentOfAcceptedPeptidesPerType = _PercentOfRandomHitsPerPSSM / _totalMemes; // for each seq type the cutoff will be the percent of hits accepted for all PSSMs devided by the number of PSSMs
for (size_t i = 0; i<_PSSM_array.size(); ++i)
{
PSSM_Scores_Cutoff << "###\t" << _PSSM_array[i].PSSM_name << "\t";
Expand Down
10 changes: 8 additions & 2 deletions PSSM_score_Peptide/computePSSM_cutoffs.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ class computePSSM_cutoffs{
size_t TotalNumberOfRandoSeq,
alphabet & alph,
const string & CutofsPerPSSM_FileName,
int totalMemes);
int totalMemes,
double PercentOfRandomHitsPerPSSM,
int minLibraryLength,
int maxLibraryLength);

private:
void generateRandomPeptides();
Expand All @@ -31,9 +34,12 @@ class computePSSM_cutoffs{
//vector<char> const & _correspondingCharacters;
map<string, randomPeptides> _randomPeptideDataSet; // map between seqType and object containing the random peptides dataset
string const & _CutofsPerPSSM_FileName;
const double PercentOfRandomHitsPerPSSM = 0.05;
alphabet& _alph;
int _totalMemes;
double _PercentOfRandomHitsPerPSSM;
int _minLibraryLength;
int _maxLibraryLength;




Expand Down
Loading