Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
akdess committed Feb 25, 2020
1 parent 2b850fb commit 50578cd
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 19 deletions.
24 changes: 12 additions & 12 deletions .Rhistory
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
loh.name.mapping <- scell_gbm$loh.name.mapping
## generate annotation data.frame
annotation <- generateAnnotation(id_type="hgnc_symbol", genes=rownames(data), ishg19=T, centromere, host="uswest.ensembl.org")
data <- data[match(annotation$Gene,rownames(data)), ]
dim(data)
object <- CreateCasperObject(raw.data=data,loh.name.mapping=loh.name.mapping,
sequencing.type="single-cell",
cnv.scale=3, loh.scale=3,expr.cutoff=0.1,matrix.type="normalized", filter="median",
annotation=annotation, method="iterative", loh=loh,
control.sample.ids="REF", cytoband=cytoband)
[email protected]
object <- CreateCasperObject(raw.data=data,loh.name.mapping=loh.name.mapping,
sequencing.type="single-cell",
cnv.scale=3, loh.scale=3,expr.cutoff=0.1,matrix.type="normalized", filter="median",
annotation=annotation, method="iterative", loh=loh,
Expand Down Expand Up @@ -510,3 +498,15 @@ log.ge <- as.matrix(mm135@assays$RNA@data)
control <- names(Idents(mm135) )[Idents(mm135) %in% c(2,7)]
mm <- names(Idents(mm135) )[Idents(mm135) %in% c(0, 1, 3, 4)]
Sys.getenv("PATH")
require(devtools)
install_github("akdess/CaSpER")
require(devtools)
install_github("akdess/CaSpER")
require(devtools)
install_github("akdess/CaSpER", force=T)
require(devtools)
install_github("akdess/CaSpER", force=T)
?install_github
require(devtools)
install_github("akdess/CaSpER", force=TRUE
)
4 changes: 1 addition & 3 deletions .Rproj.user/shared/notebooks/paths
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
C:/Users/aharmanci/Documents/GitHub/CaSpER/vignettes/Introduction.Rmd="3445A632"
C:/Users/aharmanci/Google Drive/uthealth/codebase_yale/codebase_uthealth/CaSpER/.Rbuildignore="38A4872D"
C:/Users/aharmanci/Google Drive/uthealth/codebase_yale/codebase_uthealth/CaSpER/.gitignore="F2FE8DC2"
C:/Users/aharmanci/Google Drive/uthealth/codebase_yale/codebase_uthealth/CaSpER/DESCRIPTION="51BDE6AB"
C:/Users/aharmanci/Google Drive/uthealth/codebase_yale/codebase_uthealth/CaSpER/Meningioma.md="1D94301A"
C:/Users/aharmanci/Google Drive/uthealth/codebase_yale/codebase_uthealth/CaSpER/NAMESPACE="C7A3CBD9"
C:/Users/aharmanci/Google Drive/uthealth/codebase_yale/codebase_uthealth/CaSpER/README.md="A57B336"
C:/Users/aharmanci/Google Drive/uthealth/codebase_yale/codebase_uthealth/CaSpER/TCGA_GBM.md="4529EA05"
C:/Users/aharmanci/Google Drive/uthealth/codebase_yale/codebase_uthealth/CaSpER/man/CreateCasperObject.Rd="4F09AFAF"
C:/Users/aharmanci/Google Drive/uthealth/codebase_yale/codebase_uthealth/CaSpER/man/PerformMedianFilter.Rd="B751D7E3"
C:/Users/aharmanci/Google Drive/uthealth/codebase_yale/codebase_uthealth/CaSpER/man/casper.Rd="DD56F016"
C:/Users/aharmanci/Google Drive/uthealth/codebase_yale/codebase_uthealth/CaSpER/man/hello.Rd="F920EFF7"
C:/Users/aharmanci/Google Drive/uthealth/codebase_yale/codebase_uthealth/CaSpER/sCell_GBM.md="38931473"
Binary file modified src/CaSpER.dll
Binary file not shown.
26 changes: 22 additions & 4 deletions vignettes/Introduction.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ mkdir test; samtools view SRR1295366.sorted.bam | ./bin/BAFExtract -generate_com

**2. Normalized gene expression data**

The expression values should be normalized using TPM or FPKM. Below is an example normalized gene expression input :
The expression values can be normalized using TPM or FPKM or raw. Below is an example normalized gene expression input :
```{r, include=FALSE}
library(knitr)
```
Expand All @@ -125,6 +125,24 @@ data(hg19_cytoband)
kable(cytoband[1:5, ])
```

HG38 cytoband information can be genrated using the flooing commands:

``` r
http://hgdownload.cse.ucsc.edu/goldenPath/hg38/database/cytoBand.txt.gz
```
```{r, eval=T}
cytoband <- read.delim("cytoBand.txt", header=F)
cytoband$V4 <-substring(cytoband$V4, 1, 1)
start <- do.call(rbind, lapply(split(cytoband$V2, paste0(cytoband$V1, cytoband$V4)), min))
end <- do.call(rbind, lapply(split(cytoband$V3, paste0(cytoband$V1, cytoband$V4)), max))
cytoband <- data.frame(V1=gsub("p", "", gsub("q", "", rownames(start))), V2=start, V3=end, V4=rownames(start), stringsAsFactors=F)
cytoband$V4[grep("q", cytoband$V4)] <- "q"
cytoband$V4[grep("p", cytoband$V4)] <- "p"
cytoband <- cytoband [ as.vector(sapply(c(1:22, "X"), function(x) which(cytoband$V1 %in% x))), ]
rownames(cytoband) <- NULL
```


Centromere information can be downloaded from UCSC.
``` r
#curl -s "http://hgdownload.cse.ucsc.edu/goldenPath/hg19/database/cytoBand.txt.gz" | gunzip -c | grep acen | head
Expand All @@ -136,7 +154,7 @@ Annotation data which contains the positions of each gene along each chromosome


```{r, eval=F}
annotation <- generateAnnotation(id_type="ensembl_gene_id", genes=rownames(yale_meningioma$data), ishg19=T, centromere)
annotation <- generateAnnotation(id_type="ensembl_gene_id", genes=rownames(yale_meningioma$data), ishg19=T, centromere, host="uswest.ensembl.org")
```

```{r, include=FALSE}
Expand Down Expand Up @@ -164,8 +182,8 @@ Casper object is created using following functions

```{r, eval=F}
object <- CreateCasperObject(raw.data=data,loh.name.mapping=loh.name.mapping, sequencing.type="bulk",
cnv.scale=3, loh.scale=3,
annotation=annotation, method="iterative", loh=loh,
cnv.scale=3, loh.scale=3, matrix.type="normalized", expr.cutoff=4.5,
annotation=annotation, method="iterative", loh=loh, filter="median",
control.sample.ids=control.sample.ids, cytoband=cytoband)
```

Expand Down

0 comments on commit 50578cd

Please sign in to comment.