Changeset 24


Ignore:
Timestamp:
Aug 21, 2012, 3:52:40 PM (8 years ago)
Author:
e.s.lips@…
Message:
 
Location:
trunk/src/jag
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/jag/jag_main.py

    r23 r24  
    1818sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)) + "/src/")
    1919sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)) + "/../") #for development reasons
     20sys.path.append('/usr/local/lib/jag/src')
     21
    2022
    2123import jag.common as common
     
    9193    --linear           perform logistic association test (in PLINK)
    9294    --covar            covariate file
     95    --sex
    9396    --gene_based       sets are based on single genes
    9497    --adjust           adjust pvalues of real data with lambda
     
    182185        run permutations
    183186        """   
    184        
     187        #print(plink.switches)
     188        if(re.search("--sex", plink.switches)):
     189            #plink.switches = " --sex"
     190            plink.switches = " "
     191        else:
     192            plink.switches = " "
     193           
    185194        log.info("\nRunning permutations...")
    186         plink.print_command = False       
     195        plink.print_command = False     
    187196        from jag.permutation import Permutation
    188197        permutation = Permutation(plink, geneset, inoutput)
     
    302311                    "bfile=", "pheno=", "set=", "perm=", "seed=",
    303312                    "orig_empp=", "control_empp=", "gene_set=",
    304                     "covar=", "logistic", "linear", "adjust"])
     313                    "covar=", "sex", "logistic", "linear", "adjust"])
    305314           
    306315            except getopt.GetoptError, err:
     
    498507                         "(--covar;", verbose)
    499508                    plink.covar_file = assigned_value
    500                                
     509               
     510                elif identifier in ("--sex"):
     511                    plink.switches += "--sex "
     512                                   
    501513                elif identifier in ("--linear"):
    502514                    plink.switches += "--linear "
  • trunk/src/jag/plink.py

    r21 r24  
    9393        """
    9494        outfile = tempfile.mkstemp()
    95 
    9695        # select logistic test
    9796        if (self.switches.count("--logistic") >= 1):
     
    171170        performs permutations 
    172171        """
     172       
    173173        permuted_pheno_file = common.create_pheno_permutation_file(self, seeds)
    174174        pheno_arg = " --pheno " + str(permuted_pheno_file + " --all-pheno" + " --extract " + self.group)
Note: See TracChangeset for help on using the changeset viewer.