Mercurial > repos > eschen42 > w4mcorcov
comparison w4mcorcov_calc.R @ 14:90708fdbc22d draft default tip
"planemo upload for repository https://github.com/HegemanLab/w4mcorcov_galaxy_wrapper/tree/master commit 5fd9687d543a48a715b1180caf93abebebd58b0e"
author | eschen42 |
---|---|
date | Wed, 18 Nov 2020 18:53:37 +0000 |
parents | 2ae2d26e3270 |
children |
comparison
equal
deleted
inserted
replaced
13:2ae2d26e3270 | 14:90708fdbc22d |
---|---|
20 x = x_dataMatrix | 20 x = x_dataMatrix |
21 , y = x_predictor | 21 , y = x_predictor |
22 , algoC = x_algorithm | 22 , algoC = x_algorithm |
23 , predI = 1 | 23 , predI = 1 |
24 , orthoI = if (ncol(x_dataMatrix) > 1) 1 else 0 | 24 , orthoI = if (ncol(x_dataMatrix) > 1) 1 else 0 |
25 , printL = FALSE | 25 , fig.pdfC = 'none' |
26 , plotL = FALSE | 26 , info.txtC = 'none' |
27 , crossvalI = x_crossval_i | 27 , crossvalI = x_crossval_i |
28 , scaleC = "pareto" # data centered and pareto scaled here only. This line fixes issue #2. | 28 , scaleC = "pareto" # data centered and pareto scaled here only. This line fixes issue #2. |
29 ) | 29 ) |
30 # strip out variables having negligible variance | 30 # strip out variables having negligible variance |
31 x_dataMatrix <- x_dataMatrix[ , names(my_oplsda@vipVn), drop = FALSE] | 31 x_dataMatrix <- x_dataMatrix[ , names(my_oplsda@vipVn), drop = FALSE] |
441 # extract the levels from the environment | 441 # extract the levels from the environment |
442 originalLevCSV <- levCSV <- calc_env$levCSV | 442 originalLevCSV <- levCSV <- calc_env$levCSV |
443 # matchingC is one of { "none", "wildcard", "regex" } | 443 # matchingC is one of { "none", "wildcard", "regex" } |
444 matchingC <- calc_env$matchingC | 444 matchingC <- calc_env$matchingC |
445 labelFeatures <- calc_env$labelFeatures | 445 labelFeatures <- calc_env$labelFeatures |
446 minCrossvalI <- as.integer(calc_env$min_crossval_i) | |
446 | 447 |
447 # arg/env checking | 448 # arg/env checking |
448 if (!(facC %in% names(smpl_metadata))) { | 449 if (!(facC %in% names(smpl_metadata))) { |
449 failure_action( | 450 failure_action( |
450 sprintf("bad parameter! Factor name '%s' not found in sampleMetadata" | 451 sprintf("bad parameter! Factor name '%s' not found in sampleMetadata" |
598 } else { | 599 } else { |
599 "Significant features" | 600 "Significant features" |
600 } | 601 } |
601 , x_show_labels = labelFeatures | 602 , x_show_labels = labelFeatures |
602 , x_progress = progress_action | 603 , x_progress = progress_action |
603 , x_crossval_i = min(7, length(chosen_samples)) | 604 , x_crossval_i = min(minCrossvalI, length(chosen_samples)) |
604 , x_env = calc_env | 605 , x_env = calc_env |
605 ) | 606 ) |
606 if ( is.null(my_cor_cov) ) { | 607 if ( is.null(my_cor_cov) ) { |
607 progress_action("NOTHING TO PLOT") | 608 progress_action("NOTHING TO PLOT") |
608 } else { | 609 } else { |
672 } else { | 673 } else { |
673 "Significant features" | 674 "Significant features" |
674 } | 675 } |
675 , x_show_labels = labelFeatures | 676 , x_show_labels = labelFeatures |
676 , x_progress = progress_action | 677 , x_progress = progress_action |
677 , x_crossval_i = min(7, length(chosen_samples)) | 678 , x_crossval_i = min(minCrossvalI, length(chosen_samples)) |
678 , x_env = calc_env | 679 , x_env = calc_env |
679 ) | 680 ) |
680 if ( is.null(my_cor_cov) ) { | 681 if ( is.null(my_cor_cov) ) { |
681 progress_action("NOTHING TO PLOT.") | 682 progress_action("NOTHING TO PLOT.") |
682 } else { | 683 } else { |
751 , x_is_match = is_match | 752 , x_is_match = is_match |
752 , x_algorithm = "nipals" | 753 , x_algorithm = "nipals" |
753 , x_prefix = "Features" | 754 , x_prefix = "Features" |
754 , x_show_labels = labelFeatures | 755 , x_show_labels = labelFeatures |
755 , x_progress = progress_action | 756 , x_progress = progress_action |
756 , x_crossval_i = min(7, length(chosen_samples)) | 757 , x_crossval_i = min(minCrossvalI, length(chosen_samples)) |
757 , x_env = calc_env | 758 , x_env = calc_env |
758 ) | 759 ) |
759 if ( is.null(my_cor_cov) ) { | 760 if ( is.null(my_cor_cov) ) { |
760 progress_action("NOTHING TO PLOT...") | 761 progress_action("NOTHING TO PLOT...") |
761 } else { | 762 } else { |
804 , x_is_match = is_match | 805 , x_is_match = is_match |
805 , x_algorithm = "nipals" | 806 , x_algorithm = "nipals" |
806 , x_prefix = "Features" | 807 , x_prefix = "Features" |
807 , x_show_labels = labelFeatures | 808 , x_show_labels = labelFeatures |
808 , x_progress = progress_action | 809 , x_progress = progress_action |
809 , x_crossval_i = min(7, length(chosen_samples)) | 810 , x_crossval_i = min(minCrossvalI, length(chosen_samples)) |
810 , x_env = calc_env | 811 , x_env = calc_env |
811 ) | 812 ) |
812 if ( is.null(my_cor_cov) ) { | 813 if ( is.null(my_cor_cov) ) { |
813 progress_action("NOTHING TO PLOT.....") | 814 progress_action("NOTHING TO PLOT.....") |
814 } else { | 815 } else { |