Skip to content

Commit 8dd00cc

Browse files
committed
Add basic statistical pipeline metafx chisq and improve feature construction
1 parent 36facef commit 8dd00cc

File tree

6 files changed

+499
-6
lines changed

6 files changed

+499
-6
lines changed

.github/workflows/test.yml

+5
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ jobs:
3737
run: |
3838
export PATH=bin:$PATH
3939
metafx colored -t 6 -m 6G -k 31 -i test_data/sample_list_3.txt --n-comps 100 --perc 0.7 -w wd_colored
40+
- name: metafx chisq (with depth)
41+
run: |
42+
export PATH=bin:$PATH
43+
metafx chisq -t 6 -m 6G -k 31 -i test_data/sample_list.txt -w wd_chisq_4 --skip-graph -n 1000
44+
metafx chisq -t 6 -m 6G -k 31 -i test_data/sample_list_3.txt -w wd_chisq_3 --skip-graph -n 10000 --depth 15
4045
- name: metafx stats
4146
run: |
4247
export PATH=bin:$PATH

bin/metafx

+5-6
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ help_message () {
1616
echo " metaspades Unsupervised feature extraction via metaSpades (https://cab.spbu.ru/software/meta-spades/)"
1717
echo ""
1818
echo " unique Supervised feature extraction using group-specific k-mers"
19+
echo " chisq Supervised feature extraction using top significant k-mers by chi-squared test"
1920
echo " stats Supervised feature extraction using statistically significant k-mers"
2021
echo " colored Supervised feature extraction using group-colored de Bruijn graph"
21-
echo " lda Supervised feature extraction via Latent Dirichlet allocation model"
2222
echo ""
2323
echo " pca PCA visualisation of samples based on extracted features"
2424
echo " fit Machine Learning methods to train classification model based on extracted features"
@@ -57,6 +57,10 @@ elif [ "$1" = unique ]; then
5757
echo metafx unique ${@:2} | tee -a $LOGFILE
5858
{ time ${PIPES}/unique.sh ${@:2} 2>&1; echo $? >> $LOGFILE; } | tee -a $LOGFILE
5959
exit `tail -1 $LOGFILE`
60+
elif [ "$1" = chisq ]; then
61+
echo metafx chisq ${@:2} | tee -a $LOGFILE
62+
{ time ${PIPES}/chisq.sh ${@:2} 2>&1; echo $? >> $LOGFILE; } | tee -a $LOGFILE
63+
exit `tail -1 $LOGFILE`
6064
elif [ "$1" = stats ]; then
6165
echo metafx stats ${@:2} | tee -a $LOGFILE
6266
{ time ${PIPES}/stats.sh ${@:2} 2>&1; echo $? >> $LOGFILE; } | tee -a $LOGFILE
@@ -65,11 +69,6 @@ elif [ "$1" = colored ]; then
6569
echo metafx colored ${@:2} | tee -a $LOGFILE
6670
{ time ${PIPES}/colored.sh ${@:2} 2>&1; echo $? >> $LOGFILE; } | tee -a $LOGFILE
6771
exit `tail -1 $LOGFILE`
68-
elif [ "$1" = lda ]; then
69-
echo "Not implemented error! Module is under development."
70-
exit 1
71-
#echo metafx lda ${@:2}
72-
#time ${PIPES}/lda.sh ${@:2}
7372
elif [ "$1" = pca ]; then
7473
echo metafx pca ${@:2} | tee -a $LOGFILE
7574
{ time ${PIPES}/pca.sh ${@:2} 2>&1; echo $? >> $LOGFILE; } | tee -a $LOGFILE

0 commit comments

Comments
 (0)