get_MHic_data<-function(reads_file){
filetype<-grepl("\\.matrix$", reads_file)
if(!filetype){filetype<-grepl("\\.table$", reads_file)}
else if(!filetype){
filetype<-grepl("\\.txt$", reads_file)}
##########################################################
if(filetype){
reads<-read.matrix(interaction_file, header = FALSE, sep = "\t")
}
else{stop('data must be in MHiC format')}
interactions<-data.frame(reads$V1,reads$V2,reads$V3,reads$V4
,reads$V5)
names(interactions)<-c("chr1", "locus1_start", "chr2", "locus2_start"
,"frequencies")
return(interactions)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.