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

option for shuffle to maintain spacing #145

Closed
jayhesselberth opened this issue Nov 14, 2016 · 4 comments
Closed

option for shuffle to maintain spacing #145

jayhesselberth opened this issue Nov 14, 2016 · 4 comments
Assignees
Labels

Comments

@jayhesselberth
Copy link
Member

jayhesselberth commented Nov 14, 2016

from the paper:

The p-value and the direction of difference from the null hypothesis (that the positions of Q and R are independent) are obtained by permutation. Each permutation randomizes the query intervals uniformly across the chromosome, maintaining the spacing between intervals.

emphasis added. seems like a reasonable option for bed_shuffle().

@jayhesselberth jayhesselberth changed the title jaccard to maintain spacing option for jaccard to maintain spacing Nov 15, 2016
@jayhesselberth
Copy link
Member Author

the easiest way to do this would be:

  1. calculate interval spacing
  2. pick a random start for the first interval
  3. use the spacings to set the coordinates for the other intervals.

would need to deal with spacing per chromosome, and also make sure that all intervals on a chrom are in-bounds, given the random start.

@jayhesselberth
Copy link
Member Author

for simplicity, the above should probably ignore incl and excl params. and issue a message to that effect.

@jayhesselberth
Copy link
Member Author

Could also pick a random offset with the spacing dists, using that as the first and then circling back when the end is reached.

@jayhesselberth jayhesselberth self-assigned this Nov 21, 2016
@jayhesselberth jayhesselberth changed the title option for jaccard to maintain spacing option for shuffle to maintain spacing Nov 21, 2016
@jayhesselberth
Copy link
Member Author

closing for now

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