Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Xavier Grand
ChIPster
Commits
b6467be2
Commit
b6467be2
authored
Nov 25, 2021
by
Xavier Grand
Browse files
Demmarage modif pour distance exon-pics FasterDB avec bedtools
parent
b1bb6953
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/CTCF2.yml
View file @
b6467be2
...
...
@@ -25,6 +25,9 @@ idx: "/home/adminxavier/CTCF/Ref/genomeindex/"
# output folder under results/ directory
project
:
"
CTCF_peak_calling_input_Genome_part2"
# FasterDB exons bed file
exons
:
"
/home/adminxavier/CTCF/ChIPster/data/exon_sorted.bed"
input
:
row1
:
...
...
src/MYCN.yml
View file @
b6467be2
...
...
@@ -25,6 +25,9 @@ idx: "/home/adminxavier/CTCF/Ref/genomeindex/"
# output folder under results/ directory
project
:
"
SRA293647_MYCN_BE2"
# FasterDB exons bed file
exons
:
"
/home/adminxavier/CTCF/ChIPster/data/exon_sorted.bed"
input
:
row1
:
...
...
src/chipster.nf
View file @
b6467be2
...
...
@@ -17,7 +17,8 @@ params.peak_calling_out = "$params.project/Peak_calling/"
params.bam_to_bed_out = "$params.project/Bed/"
params.bed_slop_out = "$params.project/Bed_sloped/"
params.bedGraph_out = "$params.project/BedGraph/"
params.chipseq_bam2BW_out = "$params.project/chipseq_BigWig"
params.chipseq_bam2BW_out = "$params.project/chipseq_BigWig/"
params.nearestExonDist_out = "$params.project/nearest_Exon_From_Peak/"
/*
****************************************************************
...
...
@@ -28,6 +29,7 @@ params.chipseq_bam2BW_out = "$params.project/chipseq_BigWig"
log.info "fastq folder : ${params.fastq_folder}"
log.info "genome file : ${params.genome}"
log.info "genome sizes : ${params.chrom_sizes}"
log.info "fasterDB exons bed file : ${params.exons}"
/*
****************************************************************
...
...
@@ -72,6 +74,11 @@ Channel
.map{it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]}
.set{ genome_sizes }
Channel
.fromPath( params.exons )
.ifEmpty { error "Cannot find any files matching: ${params.exons }" }
.set { exons }
/*
****************************************************************
Imports
...
...
@@ -90,6 +97,7 @@ include { sort_bam_chipster } from "./nf_modules/samtools/main.nf"
include { index_bam_chipster } from "./nf_modules/samtools/main.nf"
include { chipseq_bam2BW_chipster } from "./nf_modules/deeptools/main.nf"
include { peak_calling } from "./nf_modules/macs3/main.nf"
include { nearestExon_To_Peak } from "./nf_modules/bedtools/main.nf"
/*
****************************************************************
...
...
@@ -162,6 +170,9 @@ workflow {
index_bam_chipster.out.bam_idx.groupTuple(by: 3).set { combined_bams }
combined_bams.map { it -> if(it[4][0] == 'IP') { [it[3], it[1][0], it[1][1]] } else {[ it[3], it[1][1], it[1][0]]} }.set { peak_calling_channel_in }
// peak calling using MACS3
Prend des bed ou des bam en entrée
...
// peak calling using MACS3
, bed or bam files as input
...
peak_calling(peak_calling_channel_in)
// Nearest fasterDB exons detection and distance calculation.
// nearestExon_To_Peak(peak_calling.out.bed, )
}
\ No newline at end of file
src/nf_modules/bedtools/main.nf
View file @
b6467be2
...
...
@@ -194,4 +194,27 @@ bedtools genomecov -bg\
-g ${chromsizes} \
> ${bed.simpleName}.bg
"""
}
params.nearestExonDist = ""
params.nearestExonDist_out = ""
process nearestExon_To_Peak {
container = "${container_url}"
label "big_mem_mono_cpus"
tag "${bed_id}"
if (params.nearestExonDist_out != "") {
publishDir "results/${params.nearestExonDist_out}", mode: 'copy'
}
input:
tuple val(bed_id), path(bed), val(condition), val(type)
path( exons )
output:
tuple val(bed_id), path("*_nearestExon.bed"), val(condition), val(type), emit: bed_exon
script:
"""
bedtools closest -d -a ${bed} -b ${db} > ${bed_id}_nearestExon.bed
"""
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment