Esempio n. 1
0
    file_listpars, SWITCH_posthoc, comm_str, NA_WARN, CAT_PAIR_COMP \
    = main(sys.argv[1:])

    if not (NA_WARN):
        print("++ Won't warn about NAs in the data.")

    #arg_list = sys.argv
    #str_sep = ' '
    #arg_str = str_sep.join(arg_list)
    arg_str = "fat_mvm_scripter.py"  #sys.argv[0]
    arg_str += ' ' + comm_str

    ## For VAR lists
    # get file list from either of two ways.
    if file_listmodel:
        var_list = GR.ReadSection_and_Column(file_listmodel, 0)
    elif list_model:
        var_list = list_model.split()
    else:
        print("** Error! Cannot read in model values.")
        sys.exit(4)

    ##### don't do this here, because of interactions! Nvar = len( var_list )

    ## For ROI lists
    if file_listrois:
        roi_list = GR.ReadSection_and_Column(file_listrois, 0)
    elif userlist_roi:
        roi_list = userlist_roi.split()
    else:
        roi_list = GR.GetFromLogFile(file_log, GR.LOG_LABEL_roilist)
Esempio n. 2
0
        print "\tThe glob one after '-m' will be ignored."

    return file_matr_glob, file_listmatch, ele, SWITCH_ExternLabsOK


########################################################################

if __name__ == "__main__":
    set_printoptions(linewidth=200)
    print "\n"
    file_matr_glob, file_listmatch, ele,  ExternLabsOK \
     = main(sys.argv[1:])

    # get file list from either of two ways.
    if file_listmatch:
        list_all = GR.ReadSection_and_Column(file_listmatch, 0)
    elif file_matr_glob:
        list_all = glob(file_matr_glob)
    else:
        print "** Error! Cannot read in matrix files."
        sys.exit(4)

    if not (list_all):
        print "** Error! Could not find/read in any matrix files."
        sys.exit(4)

    # this one gets the matched pair name.
    if GR.IsFirstUncommentedSection_Multicol(file_listmatch):
        list_all_out = GR.ReadSection_and_Column(file_listmatch, 1)
    else:
        # we still allow selection by ROI number, not label, so we
Esempio n. 3
0
    arg_list = sys.argv
    str_sep = ' '
    arg_str = str_sep.join(arg_list)

    ### get list of CSV file data
    csv_raw, csv_colvars = GR.LoadInCSV(file_csv)
    csv_data, csv_coltypes = GR.ConvertCSVfromStr(csv_raw, csv_colvars,
                                                  NA_WARN)
    csv_subj = [x[0] for x in csv_data]

    ## For VAR lists
    # get file list from either of two ways.
    var_sublist = []
    if file_listmodel:
        var_sublist = GR.ReadSection_and_Column(file_listmodel, 0)
    elif list_model:
        var_sublist = list_model.split()

    ### NET/GRID-- want col [1] of listfile, if it's there
    grid_subj = []
    if file_matr_glob or file_listmatch:
        grid_data, grid_subj = GR.GroupListOfFullMatrs(file_matr_glob, \
                                                           file_listmatch, \
                                                           0)
        if len(grid_subj) == 0:
            print "** ERROR: Ended up with no subjects when reading '%s'." \
             %  file_matr_glob
            sys.exit(1)

        # check about grid or not...