Skip to content
Snippets Groups Projects
Commit 97cb8a16 authored by Aurelien Brionne's avatar Aurelien Brionne
Browse files

obsexp upgrade

parent 11297df4
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,8 @@ Ready to use Nextflow CGI workflow available on genotoul /work/project/lpgp/Next
## Usage example
### newcpgreport
```bash
#!/bin/bash
#SBATCH -J CGI
......@@ -23,6 +25,37 @@ nextflow run /work/project/lpgp/Nextflow/cgi/ \
--out_dir "${PWD}/results"
```
### cpg_lh (UCSC)
```bash
#!/bin/bash
#SBATCH -J CGI
#SBATCH -p unlimitq
module load system/singularity-3.7.3
module load bioinfo/Nextflow-v21.04.1
nextflow run /work/project/lpgp/Nextflow/cgi/ \
-profile slurm \
--genome "genome.fa.gz" \
--cpglh \
--out_dir "${PWD}/results"
```
### CpG Obs/Exp window
```bash
#!/bin/bash
#SBATCH -J CGI
#SBATCH -p unlimitq
module load system/singularity-3.7.3
module load bioinfo/Nextflow-v21.04.1
nextflow run /work/project/lpgp/Nextflow/cgi/ \
-profile slurm \
--genome "genome.fa.gz" \
--obsexp \
--obsexp_w 200 \
--out_dir "${PWD}/results"
```
## Install CGI flow and build singularity image
Clone CGI git and build local singularity image (with system admin) based on the provided singularity definition file.
......
......@@ -155,7 +155,15 @@ Data[,query:=NULL]
# write
data.table::fwrite(
Data,
file="ObsExp_w.txt",
file=paste(
sub(
" .+$",
"",
names(Fa)
),
"ObsExp_w.txt",
sep ="_"
),
sep="\t",
quote=FALSE,
col.names = FALSE
......@@ -163,6 +171,9 @@ data.table::fwrite(
# gzip
R.utils::gzip(
"ObsExp_w.txt"
list.files(
pattern="ObsExp_w.txt",
full.names = TRUE
)
)
#//
\ No newline at end of file
......@@ -117,10 +117,7 @@ process OBSEXP_COLLECT {
script:
"""
echo -e "seqnames\\tstart\\tend\\width\\tC\\tG\\tCpG\\tObsExp" > "ObsExp_w${params.obsexp_w}.txt"
cat ./*.gz >> "ObsExp_w${params.obsexp_w}.txt"
zcat ./*.gz >> "ObsExp_w${params.obsexp_w}.txt"
gzip "ObsExp_w${params.obsexp_w}.txt"
"""
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment