Skip to content

Commit

Permalink
fx bugs & update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Shixiang Wang (王诗翔) committed May 15, 2024
1 parent c52bb91 commit 239ba9b
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 29 deletions.
9 changes: 8 additions & 1 deletion R/ascat.R
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ gcap.runASCAT <- function(tumourseqfile,
BED_file = BED_file,
probloci_file = probloci_file,
gender = gd,
genomeVersion = genome_build,
chrom_names = chrom_names,
min_base_qual = min_base_qual,
min_map_qual = min_map_qual,
Expand All @@ -164,7 +165,7 @@ gcap.runASCAT <- function(tumourseqfile,
genomeVersion = genome_build
)

ascat.bc <- ASCAT::ascat.correctLogR(ascat.bc, GCcontentfile, replictimingfile, genomeVersion = genome_build)
ascat.bc <- ASCAT::ascat.correctLogR(ascat.bc, GCcontentfile, replictimingfile)

} else {
ascat.prepareHTS(
Expand Down Expand Up @@ -223,6 +224,12 @@ gcap.runASCAT <- function(tumourseqfile,
ascat.output = c(ascat.output, list(QC = QC))
}

# Clean unnecessary files
fls = list.files(pattern = "alleleFrequencies", full.names = TRUE)
if (length(fls) > 0) {
file.remove(fls)
}

saveRDS(ascat.output, file = paste0(id, ".ASCAT.rds"))

lg$info("job {id} done")
Expand Down
33 changes: 19 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,6 @@ sources are preferred as input of **gcap** .

## Installation

### Download reference files (WES bam data only)

For advanced users, you can prepare the reference files by following the instructions
from <https://github.com/shixiangwang/ascat/tree/v3.0>.

We recommend all users directly download the reference files from the links below:

- [Curated reference files for GCAP (WES)](https://zenodo.org/records/6364977)

> The prediction model was built with data on the top of hg38 genome build, so
hg38-based BAM file input is more recommended.

### Install alleleCount (WES bam data only)

[**alleleCount**](https://github.com/cancerit/alleleCount) is required to run **ASCAT** on WES bam data,
Expand All @@ -41,7 +29,7 @@ if you use **conda** or other approaches, please set the path when you use corre

### Install ASCAT (required)

#### Latest ASCAT
#### Latest ASCAT v3

From v1.2, GCAP uses the latest version of ASCAT. Install **ASCAT** v3 in R console from GitHub with:

Expand All @@ -52,7 +40,17 @@ remotes::install_github('VanLoo-lab/ascat/ASCAT')

We have provided generated reference files above, but sometimes you may want to generate the reference data for yourself, in such case, please refer to <https://github.com/VanLoo-lab/ascat> for generating the required allele-specific copy number data.

#### A fixed version of ASCAT
**Reference files**:

The reference files are required in ASCAT for copy number calling.

- [Curated reference files for WES](https://github.com/VanLoo-lab/ascat/tree/master/ReferenceFiles/WES)

> The prediction model was built with data on the top of hg38 genome build, so
hg38-based BAM file input is more recommended.


#### A fixed version of ASCAT v3

In our manuscript, we used a fixed version of ASCAT for the GCAP data pre-processing (modified and adapted for GCAP workflow in HPC). It does not fit the R version `>=4.3`.

Expand All @@ -64,6 +62,10 @@ remotes::install_github("ShixiangWang/ascat@v3-for-gcap-v1", subdir = "ASCAT")
# See https://github.com/ShixiangWang/gcap/issues/27
```

**Reference files**:

- [Curated reference files for WES](https://zenodo.org/records/6364977)

### Alternatives to ASCAT

For the latest version of GCAP, [sequenza](https://shixiangwang.github.io/gcap/reference/gcap.workflow.seqz.html) or [facets](https://shixiangwang.github.io/gcap/reference/gcap.workflow.facets.html) are supported for preprocessing the bam data, please refer to the provided links for usage.
Expand All @@ -80,6 +82,9 @@ install.packages('gcap', repos = c('https://shixiangwang.r-universe.dev', 'https
remotes::install_github("ShixiangWang/gcap")
```

> To work with the **fixed version of ASCAT**, you have to install version commits no more newer than `42f216d` (tag `v1.1.5`),
> i.e., please use `remotes::install_github("ShixiangWang/[email protected]")` and the R version should below v4.3.
If you would like to use CLI program in Shell terminal, run the following code in your R console after installation:

```r
Expand Down
31 changes: 17 additions & 14 deletions docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 239ba9b

Please sign in to comment.