Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ exclude: |
(?x)(
^assets/|
^docs/.*.html|
^_extensions/
^_extensions/|
^.*\.bed
)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down Expand Up @@ -32,7 +33,7 @@ repos:
- id: black
# R formatting
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.4.3.9026
rev: v0.4.3.9028
hooks:
- id: style-files
# general linting
Expand Down
2 changes: 1 addition & 1 deletion docs/pipeline-details/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ VCF/
. .
. .
│   └── raw_variants.chrN.vcf.gz[.tbi]
├── indel.filterd.vcf.gz[.tbi]
├── indel.filtered.vcf.gz[.tbi]
├── {sample1}-normal.germline.vcf.gz[.tbi]
├── {sample1}-tumor.germline.vcf.gz[.tbi]
.
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The `xavier` executable is composed of several inter-related sub commands. Pleas

This part of the documentation describes options and concepts for <code>xavier <b>cache</b></code> sub command in more detail. With minimal configuration, the **`cache`** sub command enables you to cache remote resources for the xavier pipeline. Caching remote resources allows the pipeline to run in an offline mode. The cache sub command can also be used to pull our pre-built reference bundles onto a new cluster or target system.

The cache sub command creates local cache on the filesysytem for resources hosted on DockerHub or AWS S3. These resources are normally pulled onto the filesystem when the pipeline runs; however, due to network issues or DockerHub pull rate limits, it may make sense to pull the resources once so a shared cache can be created and re-used. It is worth noting that a singularity cache cannot normally be shared across users. Singularity strictly enforces that its cache is owned by the user. To get around this issue, the cache subcommand can be used to create local SIFs on the filesystem from images on DockerHub.
The cache sub command creates local cache on the filesysytem for resources hosted on DockerHub or AWS S3. These resources are normally pulled onto the filesystem when the pipeline runs; however, due to network issues or DockerHub pull rate limits, it may make sense to pull the resources once so a shared cache can be created and reused. It is worth noting that a singularity cache cannot normally be shared across users. Singularity strictly enforces that its cache is owned by the user. To get around this issue, the cache subcommand can be used to create local SIFs on the filesystem from images on DockerHub.

## 2. Synopsis

Expand Down
2 changes: 1 addition & 1 deletion docs/usage/gui.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ XAVIER pipeline can be run in two different modes:\

#### 3.3a Tumor-normal pair analysis

In case of tumor-normal pairs, a tab-delimited text file is neeed that contains the list of normal and tumor samples. For example,
In case of tumor-normal pairs, a tab-delimited text file is needed that contains the list of normal and tumor samples. For example,

```bash
Normal Tumor
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ xavier run --input tests/data/*.R?.fastq.gz \

The example dataset in `tests/data` in this repository is a very small
subsampled dataset, and some steps of the pipeline fail due to the small size
(CNV callling, somalier, etc).
(CNV calling, somalier, etc).
We have a larger subsample (25% of a full human dataset) available on Biowulf if
you would like to test the full functionality of the pipeline:
`/data/CCBR_Pipeliner/testdata/XAVIER/human_subset/*.R?.fastq.gz`
4 changes: 2 additions & 2 deletions resources/cacher
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ how subsequent resources are pulled onto the cluster's filesystem. cacher utiliz
to avoid pull into resources on a compute node but support for additional job schedulers
(i.e. PBS, SGE, LSF, Tibanna) may be added in the near future.
The main entry point of the pipeline 'xavier' calls this job submission wrapper script.
As so, this script can be used to manually by-pass 'xavier' for a previously failed cache.
As so, this script can be used to manually bypass 'xavier' for a previously failed cache.
Please Note: it is highly recommended to use 'xavier'; it is the main entry point
and preferred entry point of the XAVIER pipeline. If you are experience error, it
maybe due to improperly mounting singularity bind paths which 'xavier' will internally
Expand Down Expand Up @@ -155,7 +155,7 @@ function _pull(){

# Goto Pipeline Output directory
# Create a local singularity cache in output directory
# cache can be re-used instead of re-pulling from DockerHub every time
# cache can be reused instead of re-pulling from DockerHub every time
cd "$2" && export SINGULARITY_CACHEDIR="${3}"

# unsetting XDG_RUNTIME_DIR to avoid some unsighly but harmless warnings
Expand Down
8 changes: 4 additions & 4 deletions resources/runner
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ submitted to the cluster via the job scheduler, SLURM. Support for
additional job schedulers (i.e. PBS, SGE, LSF, Tibanna) may be added
in the future.
The main entry point of the pipeline 'xavier' calls this job
submission wrapper script. As so, this script can be used to by-pass
submission wrapper script. As so, this script can be used to bypass
'xavier' for a previously failed run; meaning, it can be used to
re-run the pipeline to pick back off where the last failure occurred
or re-start the pipeline.
Expand Down Expand Up @@ -52,7 +52,7 @@ Required Arguments:
and aggregates bind paths to mount to the
container's filesystem.
If you are manually running this script
or by-passing xavier, you will need
or bypassing xavier, you will need
to provide the bind paths of the rawdata
directory(s) along with the pipeline's
output directory and any directories for
Expand Down Expand Up @@ -182,7 +182,7 @@ function submit(){

# Goto Pipeline Output directory
# Create a local singularity cache in output directory
# cache can be re-used instead of re-pulling from DockerHub every time
# cache can be reused instead of re-pulling from DockerHub every time
cd "$3" && export SINGULARITY_CACHEDIR="${5}"

# unsetting XDG_RUNTIME_DIR to avoid some unsighly but harmless warnings
Expand Down Expand Up @@ -273,7 +273,7 @@ EOF
;;
esac

# Return exit-code of pipeline sumbission
# Return exit-code of pipeline submission
echo "$job_id"
}

Expand Down
2 changes: 1 addition & 1 deletion src/xavier/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ def parsed_arguments():
default: '/lscratch/$SLURM_JOBID/'",
)

# Number of threads for the xavier pipeline's main proceess
# Number of threads for the xavier pipeline's main process
subparser_run.add_argument(
"--threads",
type=int,
Expand Down
2 changes: 1 addition & 1 deletion src/xavier/shells.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def bash(
Shell command to run
@param interpreter <str>:
Interpreter for command to run [default: bash]
@pararm strict <bool>:
@param strict <bool>:
Prefixes any command with 'set -euo pipefail' to ensure process fail with
the expected exit-code
@params kwargs <check_call()>:
Expand Down
2 changes: 1 addition & 1 deletion workflow/rules/germline.smk
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ rule Gatk_Variantfilter:
input:
vcf = os.path.join(output_germline_base,"VCF","raw_variants.vcf.gz"),
output:
indelvcf = os.path.join(output_germline_base,"VCF","indel.filterd.vcf.gz"),
indelvcf = os.path.join(output_germline_base,"VCF","indel.filtered.vcf.gz"),
snpvcf = os.path.join(output_germline_base,"VCF","snp.filtered.vcf.gz"),
vcf = os.path.join(output_germline_base,"VCF","snp_indel.filtered.vcf.gz")

Expand Down
8 changes: 4 additions & 4 deletions workflow/rules/qc.smk
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ if config['project']['annotation'] in ['hg38', 'hg38_noalt']:
@Input:
Mapped and pre-processed BAM file
@Output:
Exracted sites in (binary) somalier format
Extracted sites in (binary) somalier format
"""
input:
bam = os.path.join(output_bamdir,"final_bams","{samples}.bam"),
Expand Down Expand Up @@ -435,7 +435,7 @@ if config['project']['annotation'] in ['hg38', 'hg38_noalt']:
compare across all samples. This step also runs the ancestry estimation
function in Somalier.
@Input:
Exracted sites in (binary) somalier format for ALL samples in the cohort
Extracted sites in (binary) somalier format for ALL samples in the cohort
@Output:
Separate tab-separated value (TSV) files with relatedness and ancestry outputs
"""
Expand Down Expand Up @@ -537,7 +537,7 @@ if config['project']['annotation']=='mm10':
@Input:
Mapped and pre-processed BAM file
@Output:
Exracted sites in (binary) somalier format
Extracted sites in (binary) somalier format
"""
input:
bam = os.path.join(output_bamdir,"final_bams","{samples}.bam"),
Expand Down Expand Up @@ -565,7 +565,7 @@ if config['project']['annotation']=='mm10':
compare across all samples. This step also runs the ancestry estimation
function in Somalier.
@Input:
Exracted sites in (binary) somalier format for ALL samples in the cohort
Extracted sites in (binary) somalier format for ALL samples in the cohort
@Output:
Separate tab-separated value (TSV) files with relatedness and ancestry outputs
"""
Expand Down
32 changes: 22 additions & 10 deletions workflow/scripts/RScripts/combineAllSampleCompareResults.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ user.input.3 <- args[2]
somaliaDistance <- read.table(user.input.1, sep = "\t", header = F)
# somaliaDistance<-read.table("~/relatedness.pairs.tsv",sep = "\t",header = F)
predictedPairs <- list()
for (sample in sort(unique(c(somaliaDistance$V1, somaliaDistance$V2))))
{
samplePairs <- somaliaDistance %>% dplyr::filter(V1 %in% sample | V2 %in% sample)
for (sample in sort(unique(c(somaliaDistance$V1, somaliaDistance$V2)))) {
samplePairs <- somaliaDistance %>%
dplyr::filter(V1 %in% sample | V2 %in% sample)
maxRelatedess <- which(samplePairs$V3 == max(samplePairs$V3, na.rm = T))
maxHomCon <- which(samplePairs$V6 == max(samplePairs$V6, na.rm = T))
m <- intersect(maxRelatedess, maxHomCon)
if (length(m) > 0) {
for (i in m)
{
for (i in m) {
if (sample == unlist(samplePairs[i, ]$V2)) {
t <- unlist(samplePairs[i, c(2, 1, 3, 6)])
names(t) <- NULL
Expand All @@ -27,10 +26,12 @@ for (sample in sort(unique(c(somaliaDistance$V1, somaliaDistance$V2))))
}
}
} else {
print(paste0("No consensous between the Relatedness and Homology for sample:", sample))
print(paste0(
"No consensous between the Relatedness and Homology for sample:",
sample
))
maxVal <- c(maxRelatedess, maxHomCon)
for (i in maxVal)
{
for (i in maxVal) {
if (sample == unlist(samplePairs[i, ]$V2)) {
t <- unlist(samplePairs[i, c(2, 1, 3, 6)])
names(t) <- NULL
Expand All @@ -42,7 +43,12 @@ for (sample in sort(unique(c(somaliaDistance$V1, somaliaDistance$V2))))
}
}
finalPredPairs <- data.frame(do.call("rbind", predictedPairs))
colnames(finalPredPairs) <- c("Sample1", "Sample2", "Som:relatedness", "Som:hom_concordance")
colnames(finalPredPairs) <- c(
"Sample1",
"Sample2",
"Som:relatedness", # codespell:ignore-line
"Som:hom_concordance" # codespell:ignore-line
) # codespell:ignore-line

# VerifyBAMID
# verifyBAMID<-read.table(user.input.2,sep = "\t",header = T)
Expand Down Expand Up @@ -72,4 +78,10 @@ colnames(finalPredPairs) <- c("Sample1", "Sample2", "Som:relatedness", "Som:hom_
## Combine the output from both the tools
# mergedDF<-merge(x=finalPredPairs,y=finalpredictedPairsVerifyBAMID,by = "Sample1",all = TRUE)
# write.table(mergedDF[,c(1:4,6)],file = user.input.3,sep = "\t",quote = FALSE,row.names = FALSE)
write.table(finalPredPairs, file = user.input.3, sep = "\t", quote = FALSE, row.names = FALSE)
write.table(
finalPredPairs,
file = user.input.3,
sep = "\t",
quote = FALSE,
row.names = FALSE
)
Loading