-
Notifications
You must be signed in to change notification settings - Fork 10
S7 compartmap objects for analysis #115
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
so it doesn't fail when passing in both unitarized and non-unitarized objs
4e1a002 to
53c1062
Compare
d93fae7 to
91247c5
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
S7 objects for analysis
Creates a
CompartmentCallS7object with a vector of inferred singular values from compartmap or PC1 from Hi-C, the genomic resolution and a GRanges of the bins:@name: an identifier for the object@res: the resolution at which compartments were called@gr: aGRangesobject with the bins@dt: adata.tablewith indexn, singuar valuespc, and thename.This is used to store the values and to plot the object
@unitarized: Whether the values have been unitarizedCompartmentCallimplements[return a newCompartmapCallobject with subset data and grangesplot: line plot of the singular valuesflip: return a newCompartmentCallwith sign-flipped singular valuesunitarize: return a newCompartmentCallwith unitarized singular valuesDF: get the@dtslotgranges: get the@grslotresolution: get the resolutionis_unitarized: getunitarizedstateget_name: get object nameprint: print the object and property metadataCompartmapCallinherits fromCompartmentCallbut takes theGRangesoutput ofscCompartments()to construct itself:MultiCompartmentCallalso inherits fromCompartmentCallbut takes a list ofCompartmentCalland/orCompartmapCallobjects. It checks that all inputGRanges, and resolutions are the same and that they are all either unitarized or non-unitarized, unless users want to unitarize inputs withunitarize=TRUE.MultiCompartmentCallimplements[: returns a newMultiCompartmentCallobject with both row and column subsetprint: callsCompartmentCall's print method and adds@matdimensionscorr: gets correlations of every pair of input singular value vectorsagr: gets agreement of every pair of input singular value vectorsplot: plots singular values by color based on the inputsCompartmentCallnamepropertyTo compare the example k562 calls at 100kb with the HiC PC1:
plot(example_hic_100kb)I chose S7 because its simpler than the S4 system, but it does mean that the subsetting and print methods need to be written from scratch.