Skip to content

Commit

Permalink
Merge pull request #25 from jamesdalg/dev
Browse files Browse the repository at this point in the history
CRAN fixes--rebinGenomicInteractions
  • Loading branch information
jamesdalg authored Dec 5, 2019
2 parents eb898cd + 147ce40 commit caad27f
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 12 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Package: CNVScope
Type: Package
Title: A Versatile Toolkit for Copy Number Variation Relationship Data Analysis and Visualization
Version: 2.8.2
Date: 2019-10-23
Version: 2.9.2
Date: 2019-12-5
Author: James Dalgeish, Yonghong Wang, Jack Zhu, Paul Meltzer
Maintainer: James Dalgleish <[email protected]>
BugReports: https://github.com/jamesdalg/CNVScope/issues/
Depends: R (>= 3.5.0),ggplot2
Imports: InteractionSet,BiocManager,tidyr,S4Vectors,circlize,igraph,visNetwork,reshape2,magrittr,htmltools,htmlwidgets,jointseg,plotly,shinyjs,logging,shiny,RCurl,foreach,GenomicFeatures,GenomicInteractions,HiCseg,IRanges,Matrix,OpenImageR,biomaRt,heatmaply,matrixStats,shinythemes,shinycssloaders,spatialfil,GenomicRanges,plyr,data.table,rslurm,dplyr,numbers,rtracklayer,BSgenome.Hsapiens.UCSC.hg19,doParallel,stringr,tibble,GenomeInfoDb
Imports: InteractionSet,BiocManager,tidyr,S4Vectors,circlize,igraph,visNetwork,reshape2,magrittr,htmltools,htmlwidgets,jointseg,plotly,shinyjs,logging,shiny,RCurl,foreach,GenomicFeatures,GenomicInteractions,HiCseg,IRanges,Matrix,OpenImageR,biomaRt,heatmaply,matrixStats,shinythemes,shinycssloaders,spatialfil,GenomicRanges,plyr,data.table,rslurm,dplyr,numbers,rtracklayer,BSgenome.Hsapiens.UCSC.hg19,doParallel,stringr,tibble,GenomeInfoDb,Biostrings
Suggests: knitr, rmarkdown,remotes,pwr,ComplexHeatmap
VignetteBuilder: knitr
URL: https://github.com/jamesdalg/CNVScope/
Expand Down
8 changes: 7 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
CNVScope v2.8.1 (Release Date 2019-10-23)
CNVScope v2.9.2 (Release Date 2019-12-5)
==============
*Added an explicit dependency, Biostrings to keep CRAN check errors on debian from occurring.
*Made a small fix to rebinGenomicInteractions, fixing a check at the end to handle a vector input
**This will make the package compatible with R 4.0.

CNVScope v2.8.2 (Release Date 2019-10-23)
==============
*Removed all blockseg references in code. It was a nice feature to have a third algorithm, but blockseg will not be on CRAN shortly.

Expand Down
14 changes: 10 additions & 4 deletions R/rebinGenomicInteractions.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,16 @@ rebinGenomicInteractions<-function(gint=NULL,whole_genome_matrix=NULL,rownames_g
names(outputline)<-outputnames
outputline
}
if(class(output)=="character" & is.null(nrow(output))){output_df<-as.data.frame(t(output))
#colnames(output_df)<-c("row_bin_index","col_bin_index","row_bin_label","col_bin_label",as.character(names(gint)))
} else {

if(class(output)[1]=="character" & is.null(nrow(output))){
output_df<-as.data.frame(t(output))
colnames(output_df)<-c("row_bin_index","col_bin_index","row_bin_label","col_bin_label",as.character(names(gint)))

} else {
print("arrived in else condition")
output_df<-as.data.frame(matrix(as.character(output),nrow=nrow(output)))
colnames(output_df)<-c("row_bin_index","col_bin_index","row_bin_label","col_bin_label",as.character(colnames(as.data.frame(gint[1]))))}
colnames(output_df)<-c("row_bin_index","col_bin_index","row_bin_label","col_bin_label",as.character(colnames(as.data.frame(gint[1]))))
}

return(output_df)
}
5 changes: 4 additions & 1 deletion doc/additonal_examples.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ sample_aggregated_segvals_aml<-formSampleMatrixFromRawGDCData(tcga_files = targe
saveRDS(sample_aggregated_segvals_aml,"aml_sample_matched_input_matrix.rds")
```

Now that we've created and saved the AML matrix, let's visualize it with a quick correlation map of a single chromosome, chromosome 7, the location of the BRAF gene and nearby EZH2 gene(. The BRAF gene (chr7:140419127-140624564) is a locus for recurrent copy number aberrations(reference: http://www.bloodjournal.org/blood/article/130/Supplement%201/3800/71708/Recurrent-Copy-Number-Variants-Are-Highly?searchresult=1).
Now that we've created and saved the AML matrix, let's visualize it with a quick correlation map of a single chromosome, chromosome 7, the location of the BRAF gene and nearby EZH2 gene. The BRAF gene (chr7:140419127-140624564) is a locus for recurrent copy number aberrations.

Reference: Tarlock et al.; Recurrent Copy Number Variants Are Highly Prevalent
in Acute Myeloid Leukemia. Blood 2017; 130 (Supplement 1): 3800.).

Some of the bins are invariant and correlation requires that the standard deviation be a value other than zero (otherwise correlation cannot be calculated). We will remove them in a couple steps and transpose the matrix, making the columns the bins and the samples the rows.
```{r aml_plots, eval=T,echo=T}
Expand Down
3 changes: 2 additions & 1 deletion doc/additonal_examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,8 @@ <h4 class="date">7/9/2019</h4>
print(target_files_aml)</code></pre>
<pre class="r"><code>sample_aggregated_segvals_aml&lt;-formSampleMatrixFromRawGDCData(tcga_files = target_files_aml,format = &quot;TARGET&quot;)
saveRDS(sample_aggregated_segvals_aml,&quot;aml_sample_matched_input_matrix.rds&quot;)</code></pre>
<p>Now that we’ve created and saved the AML matrix, let’s visualize it with a quick correlation map of a single chromosome, chromosome 7, the location of the BRAF gene and nearby EZH2 gene(. The BRAF gene (chr7:140419127-140624564) is a locus for recurrent copy number aberrations(reference: <a href="http://www.bloodjournal.org/blood/article/130/Supplement%201/3800/71708/Recurrent-Copy-Number-Variants-Are-Highly?searchresult=1" class="uri">http://www.bloodjournal.org/blood/article/130/Supplement%201/3800/71708/Recurrent-Copy-Number-Variants-Are-Highly?searchresult=1</a>).</p>
<p>Now that we’ve created and saved the AML matrix, let’s visualize it with a quick correlation map of a single chromosome, chromosome 7, the location of the BRAF gene and nearby EZH2 gene. The BRAF gene (chr7:140419127-140624564) is a locus for recurrent copy number aberrations.</p>
<p>Reference: Tarlock et al.; Recurrent Copy Number Variants Are Highly Prevalent in Acute Myeloid Leukemia. Blood 2017; 130 (Supplement 1): 3800.).</p>
<p>Some of the bins are invariant and correlation requires that the standard deviation be a value other than zero (otherwise correlation cannot be calculated). We will remove them in a couple steps and transpose the matrix, making the columns the bins and the samples the rows.</p>
<pre class="r"><code>sample_aggregated_segvals_aml&lt;-readRDS(&quot;aml_sample_matched_input_matrix.rds&quot;)
invariant_bins&lt;-which((sample_aggregated_segvals_aml[stringr::str_detect(rownames(sample_aggregated_segvals_aml),&quot;chr7&quot;),] %&gt;% t() %&gt;% as.data.frame() %&gt;% sapply(sd))==0)
Expand Down
5 changes: 4 additions & 1 deletion vignettes/additonal_examples.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ sample_aggregated_segvals_aml<-formSampleMatrixFromRawGDCData(tcga_files = targe
saveRDS(sample_aggregated_segvals_aml,"aml_sample_matched_input_matrix.rds")
```

Now that we've created and saved the AML matrix, let's visualize it with a quick correlation map of a single chromosome, chromosome 7, the location of the BRAF gene and nearby EZH2 gene(. The BRAF gene (chr7:140419127-140624564) is a locus for recurrent copy number aberrations(reference: http://www.bloodjournal.org/blood/article/130/Supplement%201/3800/71708/Recurrent-Copy-Number-Variants-Are-Highly?searchresult=1).
Now that we've created and saved the AML matrix, let's visualize it with a quick correlation map of a single chromosome, chromosome 7, the location of the BRAF gene and nearby EZH2 gene. The BRAF gene (chr7:140419127-140624564) is a locus for recurrent copy number aberrations.

Reference: Tarlock et al.; Recurrent Copy Number Variants Are Highly Prevalent
in Acute Myeloid Leukemia. Blood 2017; 130 (Supplement 1): 3800.).

Some of the bins are invariant and correlation requires that the standard deviation be a value other than zero (otherwise correlation cannot be calculated). We will remove them in a couple steps and transpose the matrix, making the columns the bins and the samples the rows.
```{r aml_plots, eval=T,echo=T}
Expand Down
3 changes: 2 additions & 1 deletion vignettes/additonal_examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,8 @@ <h4 class="date">7/9/2019</h4>
print(target_files_aml)</code></pre>
<pre class="r"><code>sample_aggregated_segvals_aml&lt;-formSampleMatrixFromRawGDCData(tcga_files = target_files_aml,format = &quot;TARGET&quot;)
saveRDS(sample_aggregated_segvals_aml,&quot;aml_sample_matched_input_matrix.rds&quot;)</code></pre>
<p>Now that we’ve created and saved the AML matrix, let’s visualize it with a quick correlation map of a single chromosome, chromosome 7, the location of the BRAF gene and nearby EZH2 gene(. The BRAF gene (chr7:140419127-140624564) is a locus for recurrent copy number aberrations(reference: <a href="http://www.bloodjournal.org/blood/article/130/Supplement%201/3800/71708/Recurrent-Copy-Number-Variants-Are-Highly?searchresult=1" class="uri">http://www.bloodjournal.org/blood/article/130/Supplement%201/3800/71708/Recurrent-Copy-Number-Variants-Are-Highly?searchresult=1</a>).</p>
<p>Now that we’ve created and saved the AML matrix, let’s visualize it with a quick correlation map of a single chromosome, chromosome 7, the location of the BRAF gene and nearby EZH2 gene. The BRAF gene (chr7:140419127-140624564) is a locus for recurrent copy number aberrations.</p>
<p>Reference: Tarlock et al.; Recurrent Copy Number Variants Are Highly Prevalent in Acute Myeloid Leukemia. Blood 2017; 130 (Supplement 1): 3800.).</p>
<p>Some of the bins are invariant and correlation requires that the standard deviation be a value other than zero (otherwise correlation cannot be calculated). We will remove them in a couple steps and transpose the matrix, making the columns the bins and the samples the rows.</p>
<pre class="r"><code>sample_aggregated_segvals_aml&lt;-readRDS(&quot;aml_sample_matched_input_matrix.rds&quot;)
invariant_bins&lt;-which((sample_aggregated_segvals_aml[stringr::str_detect(rownames(sample_aggregated_segvals_aml),&quot;chr7&quot;),] %&gt;% t() %&gt;% as.data.frame() %&gt;% sapply(sd))==0)
Expand Down

0 comments on commit caad27f

Please sign in to comment.