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

Removal of purely homozygous loci valid? #1

Open
OJWatson opened this issue Aug 22, 2017 · 0 comments
Open

Removal of purely homozygous loci valid? #1

OJWatson opened this issue Aug 22, 2017 · 0 comments
Assignees

Comments

@OJWatson
Copy link
Owner

Perhaps we should not immediately remove loci with only homozygous calls in these lines?

	##remove sites and individuals with too much missing data
	simpleS = data[In_ind,]
	simpleS = simpleS[,In_site]
	
	##remove sites with P=0 or 1
	P=rep(NA, ncol(simpleS))
	for (j in (1:ncol(simpleS))){
		temp= simpleS[,j]
		P[j]= (sum(temp==1) + 0.5*sum(temp!=0 & temp!=1& temp!=-1))/sum(temp!=-1)
	}
	In = (P!=Inf & P!="NaN" & P!=0 & P!=1)
	simpleS2= simpleS[, In]
	
	select_pos =colnames(data)[In_site][In]
	select_ind = rownames(data)[In_ind]

Perhaps it might be better to throw a warning for the user to be aware they will be removed from following MCMC, or throw an error that then prompts users to specify an additional function argument in order to force their inclusion.

@OJWatson OJWatson self-assigned this Aug 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant