Skip to content
Snippets Groups Projects
Commit fe73c982 authored by Venkat Malladi's avatar Venkat Malladi
Browse files

Merge branch '6-processCounts' into 'develop'

Resolve "process_count"

See merge request !22
parents ad35f8df 5acdbca8
Branches
Tags
2 merge requests!37v0.0.1,!22Resolve "process_count"
Pipeline #6319 passed with stages
in 3 hours, 58 minutes, and 49 seconds
......@@ -77,6 +77,13 @@ makeBigWig:
- singularity run 'docker://bicf/deeptools3.3:2.0.0' bamCoverage -p `nproc` -b ./test_data/bam/small/Q-Y5JA_1M.se.sorted.deduped.bam -o Q-Y5JA_1M.se.bw
- pytest -m makeBigWig
makeFeatureCounts:
stage: unit
script:
- singularity run 'docker://bicf/subread2:2.0.0' featureCounts -R SAM -p -G /project/BICF/BICF_Core/shared/gudmap/references/GRCh38.p12.v31/genome.fna -T `nproc` -s 1 -a /project/BICF/BICF_Core/shared/gudmap/references/GRCh38.p12.v31/genome.gtf -o Q-Y5JA_1M.se.featureCounts -g 'gene_name' --primary --ignoreDup -B ./test_data/bam/small/Q-Y5JA_1M.se.sorted.deduped.bam
- singularity run 'docker://bicf/subread2:2.0.0' Rscript ./workflow/scripts/calculateTPM.R --count Q-Y5JA_1M.se.featureCounts
- pytest -m makeFeatureCounts
fastqc:
stage: unit
script:
......@@ -92,11 +99,13 @@ inferMetadata:
integration_se:
stage: integration
script:
- ulimit -u 16384
- nextflow run ./workflow/rna-seq.nf --deriva ./test_data/auth/credential.json --bdbag ./test_data/auth/cookies.txt --repRID 16-1ZX4
integration_pe:
stage: integration
script:
- ulimit -u 16384
- nextflow run ./workflow/rna-seq.nf --deriva ./test_data/auth/credential.json --bdbag ./test_data/auth/cookies.txt --repRID Q-Y5JA -with-dag dag.png
artifacts:
name: "$CI_JOB_NAME"
......
dag.png 0 → 100644
dag.png

157 KiB

......@@ -41,6 +41,9 @@ process {
withName:inferMetadata{
container = 'bicf/rseqc3.0:2.0.0'
}
withName: makeFeatureCounts {
container = 'bicf/subread2:2.0.0'
}
}
trace {
......
This diff is collapsed.
gc()
library(optparse)
option_list=list(
make_option("--count",action="store",type='character',help="Count File")
)
opt=parse_args(OptionParser(option_list=option_list))
rm(option_list)
if (!("count" %in% names(opt))){
stop("No count file passed, exiting.")
} else if (!file.exists(opt$count)) {
stop("Count file doesn't exist, exiting.")
}
repRID <- basename(gsub(".featureCounts","",opt$count))
count <- read.delim(opt$count, comment.char="#") # if featureCounts file changes structure, be sure to update count and Length columns below
colnames(count)[7] <- "count"
rpk <- count$count/count$Length/1000
scale <- sum(rpk)/1000000
tpm <- rpk/scale
output <- cbind(count,tpm)
colnames(output)[7] <- "count"
write.table(output,file=paste0(repRID,".countTable.csv"),sep=",",row.names=FALSE,quote=FALSE)
#!/usr/bin/env python3
import pytest
import pandas as pd
import os
import utils
data_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../../'
@pytest.mark.makeFeatureCounts
def test_makeFeatureCounts():
assert os.path.exists(os.path.join(data_output_path, 'Q-Y5JA_1M.se.featureCounts'))
assert os.path.exists(os.path.join(data_output_path, 'Q-Y5JA_1M.se.countTable.csv'))
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment