Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GWAS GO-Simulations non constant candidates #28

Open
schae234 opened this issue Mar 30, 2016 · 0 comments
Open

GWAS GO-Simulations non constant candidates #28

schae234 opened this issue Mar 30, 2016 · 0 comments
Labels
Milestone

Comments

@schae234
Copy link
Member

As FCR increases, there are random genes within the GO term that are not within the COB that get replaced with genes that ARE in the COB which results in an increase in candidate genes list as FCR goes up.

offending code in SimulateGWAS.py :

        if num_genes == 0:                                                      
            continue                                                            
        eloci = term.effective_loci(                                            
            window_size=window_size                                             
        )                                                                       
        if args.percent_fcr != None and args.percent_fcr > 0:                   
            # replace some loci with random genes if FDR specified              
            num_fcr = int(len(eloci) * args.percent_fcr)                        
            fcr_loci = cob.refgen.random_genes(num_fcr,window=window_size)      
            # permute and truncate the loci then add fcr loci                   
            fcr_loci = np.concatenate([                                         
                np.random.permutation(eloci)[0:-1*len(fcr_loci)],               
                np.array(list(fcr_loci))                                        
            ])                                                                  
            assert len(fcr_loci) == len(eloci)                                  
            eloci = fcr_loci                                                    
        candidates = cob.refgen.candidate_genes(                                
            eloci,                                                              
            flank_limit=flank_limit                                             
        )

TODO: fix and write a regression test

@schae234 schae234 added the bug label Mar 30, 2016
@schae234 schae234 added this to the v0.6.0 milestone Feb 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant