Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PAQR_KAPAC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
zavolan_public
PAQR_KAPAC
Commits
b691580d
Commit
b691580d
authored
7 years ago
by
BIOPZ-Gruber Andreas (2)
Browse files
Options
Downloads
Patches
Plain Diff
Runs without randomization when choosing a small number of randomized runs.
parent
963f3c64
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
KAPAC/KAPAC.R
+22
-10
22 additions, 10 deletions
KAPAC/KAPAC.R
with
22 additions
and
10 deletions
KAPAC/KAPAC.R
+
22
−
10
View file @
b691580d
...
...
@@ -194,13 +194,17 @@ write_incl_rownames <- function(data, col_name, filename, verbose=FALSE)
data.incl_rownames
=
cbind
(
rownames
(
data
),
data
)
# create a column name
colnames
(
data.incl_rownames
)[
1
]
=
col_name
# create the full filename
full_filename
=
paste
(
filename
,
'.tab'
,
sep
=
''
)
full_filename
=
paste
(
filename
,
'.tsv'
,
sep
=
''
)
# write the data to the file
write.table
(
data.incl_rownames
,
file
=
full_filename
,
quote
=
F
,
row.names
=
F
,
col.names
=
T
,
sep
=
"\t"
)
# give some feedback to the user
if
(
verbose
)
{
message
(
paste
(
'[INFO] Wrote successfully: '
,
full_filename
,
'\n'
,
sep
=
''
))
...
...
@@ -1313,7 +1317,7 @@ if (opt$verbose) {
(
fraction_of_filtered_out_kmers
*
100
),
"[%] (="
,
length
(
filtered_out_kmers
),
" k-mers). "
,
sep
=
""
))
# report how many k-mers will be dropped
message
(
paste
(
"[INFO] Minimum k-mer abundance fraction to be considered
was chosen
(--min_kmer_abundance_fraction)
to be
: "
,
message
(
paste
(
"[INFO] Minimum k-mer abundance fraction to be considered (--min_kmer_abundance_fraction): "
,
opt
$
min_kmer_abundance_fraction
,
"\n"
,
sep
=
""
))
}
...
...
@@ -1428,6 +1432,12 @@ if (opt$number_of_randomized_runs < min_zstatistic_sample_size) {
sep
=
""
))
}
# specify the columns that should be written to the results file
cols_to_write
=
c
(
"mean_diff_zscores"
,
"mean_diff_activity"
,
"mean_diff_delta"
)
}
else
{
# in case the number of randomized runs is smaller than the recommended
...
...
@@ -1552,6 +1562,14 @@ if (opt$number_of_randomized_runs < min_zstatistic_sample_size) {
not_norm_pval_colname
,
"' column in the results)."
,
sep
=
""
))
}
# specify the columns that should be written to the results file
cols_to_write
=
c
(
"mean_diff_zscores"
,
"mean_diff_activity"
,
"mean_diff_delta"
,
"mean_diff_zscores_PADJ"
,
not_norm_padj_colname
)
}
# _____________________________________________________________________________
...
...
@@ -1570,15 +1588,9 @@ results.single_kmer_per_run.sorted =
!
(
colnames
(
kapac.result_matrix
)
%in%
kapac.result_matrix.rand_run_cols
)]
# write out the zscores
cols_to_write
=
c
(
"mean_diff_zscores"
,
"mean_diff_activity"
,
"mean_diff_delta"
,
"mean_diff_zscores_PADJ"
,
not_norm_padj_colname
)
write_incl_rownames
(
data
=
results.single_kmer_per_run.sorted
[,
cols_to_write
],
write_incl_rownames
(
data
=
results.single_kmer_per_run.sorted
[,
cols_to_write
,
drop
=
F
],
col_name
=
'kmer'
,
filename
=
paste
(
opt
$
results_dir
,
'/'
,
top_kmer_candidates_selection_criterion
,
'_ABSOLUTE_sorted'
,
sep
=
''
))
filename
=
paste
(
opt
$
results_dir
,
'/'
,
top_kmer_candidates_selection_criterion
,
sep
=
''
))
# ___________________________________________________________________________
# ---------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment