firasmidani / amiga

Analysis of Microbial Growth Assays

Home Page:https://firasmidani.github.io/amiga/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Errors occur when testing hypothesis

Ravenclawer opened this issue · comments

I tried the code in your #16 reply as follows but with error , I can't solve it by myself since I have very limited knowledge about coding, could you please help me.
exampleproject.zip

C:\Users\Administrator>cd C:\Users\Administrator\Desktop\amiga-master

C:\Users\Administrator\Desktop\amiga-master>python amiga test -i C:\Users\Administrator\Desktop\amiga-master\exampleproject -s 'substrate:0mgSodiumSelenite,10mgSodiumSelenite' --interval 24 -y 'H0:Time;H1:Time+substrate' --verbose
python: can't open file 'amiga': [Errno 2] No such file or directory

C:\Users\Administrator\Desktop\amiga-master>python amiga.py test -i C:\Users\Administrator\Desktop\amiga-master\exampleproject -s 'substrate:0mgSodiumSelenite,10mgSodiumSelenite' --interval 24 -y 'H0:Time;H1:Time+substrate' --verbose

#-----------------------------------------------------#
# User provided the following command-line arguments: #
#-----------------------------------------------------#

input.........................C:\Users\Administrator\Desktop\amiga-master\exampleproject
output........................None
flag..........................None
subset........................'substrate:0mgSodiumSelenite,10mgSodiumSelenite'
interval......................24
hypothesis....................'H0:Time;H1:Time+substrate'
skip_first_n..................0
time_step_size................1
number_permutations...........0
false_discovery_rate..........10
confidence....................0.95
subtract_blanks...............False
subtract_control..............False
verbose.......................True
fix_noise.....................False
include_gaussian_noise........False
sample_posterior..............False
dont_plot.....................False
dont_plot_delta_od............True
save_cleaned_data.............False
save_mapping_tables...........False
save_gp_data..................False
merge_summary.................False
do_not_log_transform..........True
log_transform.................False


#-----------------------------------------------#
# AMiGA is peeking inside the working directory #
#-----------------------------------------------#

Input directory..........C:\Users\Administrator\Desktop\amiga-master\exampleproject
Data directory...........C:\Users\Administrator\Desktop\amiga-master\exampleproject\data
WARNING: C:\Users\Administrator\Desktop\amiga-master\exampleproject\derived did not exist but was created.
Mapping directory........C:\Users\Administrator\Desktop\amiga-master\exampleproject\mapping
WARNING: C:\Users\Administrator\Desktop\amiga-master\exampleproject\summary did not exist but was created.
WARNING: C:\Users\Administrator\Desktop\amiga-master\exampleproject\figures did not exist but was created.
WARNING: C:\Users\Administrator\Desktop\amiga-master\exampleproject\models did not exist but was created.

Data directory C:\Users\Administrator\Desktop\amiga-master\exampleproject\data has 3 files:

    chlorella001-1.txt
    chlorella001-2.txt
    chlorella001-3.txt

#-------------------------------------------------------------#
# AMiGA is parsing command-line arguments and parameter files #
#-------------------------------------------------------------#

interval.......24.0
subset.........{"'substrate": ['0mgSodiumSelenite', "10mgSodiumSelenite'"]}
flag...........{}
hypothesis.....{"'H0": ['Time'], 'H1': ['Time', "substrate'"]}

WARNING: Because user has requested subsetting of data, results will be merged into single summary and/or data file.

#------------------------------------------#
# AMiGA is parsing and cleaning data files #
#------------------------------------------#

Reading C:\Users\Administrator\Desktop\amiga-master\exampleproject\data\chlorella001-1.txt
Reading C:\Users\Administrator\Desktop\amiga-master\exampleproject\data\chlorella001-2.txt
Reading C:\Users\Administrator\Desktop\amiga-master\exampleproject\data\chlorella001-3.txt

#--------------------------------------------#
# AMiGA is parsing and reading mapping files #
#--------------------------------------------#

No meta.txt file found

chlorella001-1................ Reading C:\Users\Administrator\Desktop\amiga-master\exampleproject\mapping\chlorella001-1.txt.
chlorella001-2................ Reading C:\Users\Administrator\Desktop\amiga-master\exampleproject\mapping\chlorella001-2.txt.
chlorella001-3................ Reading C:\Users\Administrator\Desktop\amiga-master\exampleproject\mapping\chlorella001-3.txt.

#-------------------------------------------#
# AMiGA is testing data based on user input #
#-------------------------------------------#

Traceback (most recent call last):
  File "amiga.py", line 400, in <module>
    AMiGA()
  File "amiga.py", line 90, in __init__
    getattr(self, args.command)()
  File "amiga.py", line 395, in test
    Command(args).test()
  File "C:\Users\Administrator\Desktop\amiga-master\libs\commands.py", line 97, in test
    HypothesisTest(self.mappings,self.data,self.params,self.args,self.directory)
  File "C:\Users\Administrator\Desktop\amiga-master\libs\test.py", line 61, in __init__
    if self.checkHypothesis(): return None
  File "C:\Users\Administrator\Desktop\amiga-master\libs\test.py", line 129, in checkHypothesis
    target = list(set(hypothesis['H1'])^(set(hypothesis['H0'])))
KeyError: 'H0'

it works with double quotes instead of single ones on Windows cmd. Special thanks to the @firasmidani for timely help