Skip to content

BUG: default parameters output log_transcription_quotients_vmax.txt instead of log_transcription_quotients.txt #28

@stanfish06

Description

@stanfish06

Hello! I cloned and compiled the latest code, and after I ran Sanity with default parameters, I got the _vmax.txt matrix, which, according to readme, should only be generated if I explicitly set -max_v.

Here is how to reproduce this behavior

stanfish@StanFishDeb:~/tmp$ git clone https://github.com/jmbreda/Sanity.git
Cloning into 'Sanity'...
remote: Enumerating objects: 634, done.
remote: Counting objects: 100% (114/114), done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 634 (delta 104), reused 97 (delta 95), pack-reused 520 (from 2)
Receiving objects: 100% (634/634), 1.62 MiB | 6.15 MiB/s, done.
Resolving deltas: 100% (311/311), done.
stanfish@StanFishDeb:~/tmp$ cd Sanity/src/
stanfish@StanFishDeb:~/tmp/Sanity/src$ make
g++ -I. -O2 -ffast-math -O3 -fopenmp -std=c++11 -c calc_true_variation_parallel_prior_mu_sigma.cpp
g++ -I. -O2 -ffast-math -O3 -fopenmp -std=c++11 -c ReadInputFiles.cpp
g++ -I. -O2 -ffast-math -O3 -fopenmp -std=c++11 -c FitFrac.cpp
g++ -I. -O2 -ffast-math -O3 -fopenmp -std=c++11 -c FukushimaLambertW.cc
g++ -I. -O2 -ffast-math -O3 -fopenmp -std=c++11 -c Digamma_Trigamma.cpp
g++ -I. -O2 -ffast-math -O3 -fopenmp -std=c++11 -o ../bin/Sanity calc_true_variation_parallel_prior_mu_sigma.o ReadInputFiles.o FitFrac.o FukushimaLambertW.o Digamma_Trigamma.o
stanfish@StanFishDeb:~/tmp/Sanity/src$ cd ../bin/
stanfish@StanFishDeb:~/tmp/Sanity/bin$ ls -l
total 2252
-rwxrwxr-x 1 stanfish stanfish   98608 Feb  3 14:48 Sanity
-rwxrwxr-x 1 stanfish stanfish   45800 Feb  3 14:48 Sanity_distance
-rwxrwxr-x 1 stanfish stanfish   45608 Feb  3 14:48 Sanity_gene_correlation
-rwxrwxr-x 1 stanfish stanfish 2103884 Feb  3 14:48 Sanity_macOS
stanfish@StanFishDeb:~/tmp/Sanity/bin$ cat > matrix.csv <<'EOF'
1,2,3
4,5,6
7,8,9
10,11,12
EOF
stanfish@StanFishDeb:~/tmp/Sanity/bin$ cat matrix.csv
1,2,3
4,5,6
7,8,9
10,11,12
stanfish@StanFishDeb:~/tmp/Sanity/bin$ ./Sanity -f matrix.csv
File type : csv
There were 3 rows
There were 3 genes and 2 cells
Estimated memory usage: 33 KB
Fit gene expression levels
First process now fitting gene 0 out of 0.
Print output
stanfish@StanFishDeb:~/tmp/Sanity/bin$ ls -l
total 2264
-rw-rw-r-- 1 stanfish stanfish      73 Feb  3 14:52 log_transcription_quotients_vmax.txt
-rw-rw-r-- 1 stanfish stanfish      63 Feb  3 14:52 ltq_error_bars_vmax.txt
-rw-rw-r-- 1 stanfish stanfish      27 Feb  3 14:52 matrix.csv
-rwxrwxr-x 1 stanfish stanfish   98608 Feb  3 14:48 Sanity
-rwxrwxr-x 1 stanfish stanfish   45800 Feb  3 14:48 Sanity_distance
-rwxrwxr-x 1 stanfish stanfish   45608 Feb  3 14:48 Sanity_gene_correlation
-rwxrwxr-x 1 stanfish stanfish 2103884 Feb  3 14:48 Sanity_macOS
stanfish@StanFishDeb:~/tmp/Sanity/bin$ rm log_transcription_quotients_vmax.txt ltq_error_bars_vmax.txt
stanfish@StanFishDeb:~/tmp/Sanity/bin$ ls -l
total 2256
-rw-rw-r-- 1 stanfish stanfish      27 Feb  3 14:52 matrix.csv
-rwxrwxr-x 1 stanfish stanfish   98608 Feb  3 14:48 Sanity
-rwxrwxr-x 1 stanfish stanfish   45800 Feb  3 14:48 Sanity_distance
-rwxrwxr-x 1 stanfish stanfish   45608 Feb  3 14:48 Sanity_gene_correlation
-rwxrwxr-x 1 stanfish stanfish 2103884 Feb  3 14:48 Sanity_macOS
stanfish@StanFishDeb:~/tmp/Sanity/bin$ ./Sanity -f matrix.csv -max_v false
File type : csv
There were 3 rows
There were 3 genes and 2 cells
Estimated memory usage: 33 KB
Fit gene expression levels
First process now fitting gene 0 out of 0.
Print output
stanfish@StanFishDeb:~/tmp/Sanity/bin$ ls -l
total 2264
-rw-rw-r-- 1 stanfish stanfish      73 Feb  3 14:53 log_transcription_quotients.txt
-rw-rw-r-- 1 stanfish stanfish      65 Feb  3 14:53 ltq_error_bars.txt
-rw-rw-r-- 1 stanfish stanfish      27 Feb  3 14:52 matrix.csv
-rwxrwxr-x 1 stanfish stanfish   98608 Feb  3 14:48 Sanity
-rwxrwxr-x 1 stanfish stanfish   45800 Feb  3 14:48 Sanity_distance
-rwxrwxr-x 1 stanfish stanfish   45608 Feb  3 14:48 Sanity_gene_correlation
-rwxrwxr-x 1 stanfish stanfish 2103884 Feb  3 14:48 Sanity_macOS
stanfish@StanFishDeb:~/tmp/Sanity/bin$

As you can see, I need to explicitly set -max_v false to get the standard output. Correct me if wrong but I think log_transcription_quotients.txt should be the default output according to the readme.

So I checked the source code, it appears that at line 755 in calc_true_variation_parallel_prior_mu_sigma.cpp, max_v_str is initialized to "true".

int N_param(11);
string extended_output("false");
string no_norm_str("false");
string max_v_str("true");

If an user doesn't specify -max_v, then at line 812, max_v_output will be set to true

if ( max_v_str == "true" || max_v_str == "1" || max_v_str == "only_max_output"){
	max_v_output = true;
	post_v_output = false;
	}

Is this an intended behavior or a bug? Thank you for your time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions