Skip to content

Commit da13d27

Browse files
authored
Release v0.5.0 (#33)
1 parent 95bbfc4 commit da13d27

5 files changed

Lines changed: 77 additions & 7 deletions

File tree

README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ snp_indel_calling{{"SNP/indel variant calling"}}
2626
snp_indel_phasing{{"SNP/indel phasing"}}
2727
snp_indel_annotation{{"SNP/indel annotation (optional - hg38 only)"}}
2828
haplotagging{{"Haplotagging bams"}}
29+
calculate_base_mod_freqs{{"Calculate base modificiation frequencies (ont data only)"}}
2930
generate_meth_probs{{"Generate site methylation probabilities (pacbio data only)"}}
3031
sv_calling{{"Structural variant calling"}}
3132
sv_annotation{{"Structural variant annotation (optional - hg38 only)"}}
3233
3334
input_data-.->merging-.->alignment-.->snp_indel_calling-.->snp_indel_phasing-.->haplotagging-.->sv_calling
3435
alignment-.->depth
36+
alignment-.->calculate_base_mod_freqs
3537
alignment-.->haplotagging
3638
haplotagging-.->generate_meth_probs
3739
snp_indel_phasing-.->snp_indel_annotation
@@ -85,17 +87,20 @@ haplotagging_s2{{"Description: haplotagging bams <br><br> Main tools: WhatsHap <
8587
haplotagging_s3{{"Description: haplotagging bams <br><br> Main tools: WhatsHap <br><br> Commands: whatshap haplotag"}}
8688
haplotagging_s4{{"Description: haplotagging bams <br><br> Main tools: WhatsHap <br><br> Commands: whatshap haplotag"}}
8789
88-
generate_meth_probs_s2{{"Description: Generate site methylation probabilities <br><br> Main tools: pb-CpG-tools <br><br> Commands: aligned_bam_to_cpg_scores"}}
90+
calculate_base_mod_freqs_s1{{"Description: calculate base modificiation frequencies <br><br> Main tools: minimod <br><br> Commands: minimod mod-freq"}}
91+
generate_meth_probs_s2{{"Description: generate site methylation probabilities <br><br> Main tools: pb-CpG-tools <br><br> Commands: aligned_bam_to_cpg_scores"}}
92+
calculate_base_mod_freqs_s3{{"Description: calculate base modificiation frequencies <br><br> Main tools: minimod <br><br> Commands: minimod mod-freq"}}
93+
calculate_base_mod_freqs_s4{{"Description: calculate base modificiation frequencies <br><br> Main tools: minimod <br><br> Commands: minimod mod-freq"}}
8994
9095
sv_calling_s1{{"Description: structural variant calling <br><br> Main tools: Sniffles2 and/or cuteSV <br><br> Commands: sniffles and/or cuteSV"}}
9196
sv_calling_s2{{"Description: structural variant calling <br><br> Main tools: Sniffles2 and/or cuteSV <br><br> Commands: sniffles and/or cuteSV"}}
9297
sv_calling_s3{{"Description: structural variant calling <br><br> Main tools: Sniffles2 and/or cuteSV <br><br> Commands: sniffles and/or cuteSV"}}
9398
sv_calling_s4{{"Description: structural variant calling <br><br> Main tools: Sniffles2 and/or cuteSV <br><br> Commands: sniffles and/or cuteSV"}}
9499
95-
sv_annotation_s1{{"Description: Structural variant annotation (optional - hg38 only)" <br><br> Main tools: ensembl-vep <br><br> Commands: vep}}
96-
sv_annotation_s2{{"Description: Structural variant annotation (optional - hg38 only)" <br><br> Main tools: ensembl-vep <br><br> Commands: vep}}
97-
sv_annotation_s3{{"Description: Structural variant annotation (optional - hg38 only)" <br><br> Main tools: ensembl-vep <br><br> Commands: vep}}
98-
sv_annotation_s4{{"Description: Structural variant annotation (optional - hg38 only)" <br><br> Main tools: ensembl-vep <br><br> Commands: vep}}
100+
sv_annotation_s1{{"Description: structural variant annotation (optional - hg38 only)" <br><br> Main tools: ensembl-vep <br><br> Commands: vep}}
101+
sv_annotation_s2{{"Description: structural variant annotation (optional - hg38 only)" <br><br> Main tools: ensembl-vep <br><br> Commands: vep}}
102+
sv_annotation_s3{{"Description: structural variant annotation (optional - hg38 only)" <br><br> Main tools: ensembl-vep <br><br> Commands: vep}}
103+
sv_annotation_s4{{"Description: structural variant annotation (optional - hg38 only)" <br><br> Main tools: ensembl-vep <br><br> Commands: vep}}
99104
100105
ont_data_f1-.->merging_m1-.->alignment_s1-.->snp_indel_calling_s1-.->snp_indel_phasing_s1-.->haplotagging_s1-.->sv_calling_s1
101106
ont_data_f2-.->merging_m1
@@ -109,6 +114,10 @@ alignment_s2-.->depth_s2
109114
alignment_s3-.->depth_s3
110115
alignment_s4-.->depth_s4
111116
117+
alignment_s1-.->calculate_base_mod_freqs_s1
118+
alignment_s3-.->calculate_base_mod_freqs_s3
119+
alignment_s4-.->calculate_base_mod_freqs_s4
120+
112121
alignment_s1-.->haplotagging_s1
113122
alignment_s2-.->haplotagging_s2
114123
alignment_s3-.->haplotagging_s3
@@ -142,6 +151,7 @@ sv_calling_s4-.->sv_annotation_s4
142151
- [Sniffles2](https://github.com/fritzsedlazeck/Sniffles) and/or [cuteSV](https://github.com/tjiangHIT/cuteSV)
143152
- [Samtools](https://github.com/samtools/samtools)
144153
- [mosdepth](https://github.com/brentp/mosdepth)
154+
- [minimod](https://github.com/warp9seq/minimod?tab=readme-ov-file)
145155
- [pb-CpG-tools](https://github.com/PacificBiosciences/pb-CpG-tools)
146156
- [ensembl-vep](https://github.com/Ensembl/ensembl-vep)
147157

@@ -164,6 +174,7 @@ sv_calling_s4-.->sv_annotation_s4
164174
- Alignment depth per chromosome (and per region in the case of targeted sequencing) (optional)
165175
- Phased Clair3 or DeepVariant SNP/indel VCF file
166176
- Phased and annotated Clair3 or DeepVariant SNP/indel VCF file (optional - hg38 only)
177+
- Bed base modification frequencies (ont only)
167178
- Bed and bigwig site methylation probabilities for complete read set and separate haplotypes (pacbio only)
168179
- Phased Sniffles2 and/or un-phased cuteSV SV VCF file
169180
- Phased and annotated Sniffles2 and/or un-phased and annotated cuteSV SV VCF file

config/nextflow_pipeface.config

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ process {
5050
module = 'minimap2/2.28:samtools/1.19'
5151
}
5252

53+
withName: minimod {
54+
queue = 'normal'
55+
cpus = '8'
56+
time = '2h'
57+
memory = '32GB'
58+
module = 'minimod/0.2.0'
59+
}
60+
5361
withName: mosdepth {
5462
queue = 'normal'
5563
cpus = '8'

docs/run_on_nci.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ Requirements:
159159
- provide full file paths
160160
- multiple entries for a given `sample_id` are required to have the same file extension in the `file` column (eg. '.bam', '.fastq.gz' or '.fastq')
161161
- for entries in the `file` column, the file extension must be either '.bam', '.fastq.gz' or '.fastq' (as appropriate)
162+
- for entries in the `file` column, files containing methylation data should be provided in uBAM format (and not FASTQ format)
162163
- entries in the `data_type` column must be either 'ont' or 'pacbio' (as appropriate)
163164

164165
## 4. Modify nextflow_pipeface.config

docs/software_versions.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Samtools: 1.19
22
Minimap2: 2.28-r1209
3+
minimod: 0.2.0
34
mosdepth: 0.3.9
45
Clair3: 1.0.9
56
DeepVariant 1.6.1

pipeface.nf

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,11 @@ process minimap2 {
219219
"""
220220
# run minimap
221221
minimap2 \
222+
-y \
223+
-Y \
222224
--secondary=no \
223225
--MD \
224-
-a \
225-
-Y \
226+
-a \
226227
-x $preset \
227228
-t ${task.cpus} \
228229
$ref \
@@ -241,6 +242,53 @@ process minimap2 {
241242

242243
}
243244

245+
process minimod {
246+
247+
def software = "minimod"
248+
249+
publishDir "$outdir/$family_id/$outdir2/$sample_id", mode: 'copy', overwrite: true, saveAs: { filename -> "$sample_id.$ref_name.$software.$filename" }, pattern: 'modfreqs.bed'
250+
251+
input:
252+
tuple val(sample_id), val(family_id), path(bam), val(data_type)
253+
val ref
254+
val ref_index
255+
val outdir
256+
val outdir2
257+
val ref_name
258+
259+
output:
260+
tuple val(sample_id), val(family_id), path('modfreqs.bed'), optional: true
261+
262+
script:
263+
if( data_type == 'ont' )
264+
"""
265+
# stage bam and bam index
266+
# do this here instead of input tuple so I can handle processing an aligned bam as an input file without requiring a bam index for ubam input
267+
bam_loc=\$(realpath ${bam})
268+
ln -sf \${bam_loc} sorted.bam
269+
ln -sf \${bam_loc}.bai .
270+
ln -sf \${bam_loc}.bai sorted.bam.bai
271+
# run minimod
272+
minimod \
273+
mod-freq \
274+
-b \
275+
$ref \
276+
$bam \
277+
-t ${task.cpus} \
278+
-o modfreqs.bed
279+
"""
280+
else if( data_type == 'pacbio' )
281+
"""
282+
echo "Data type is pacbio, not running minimod on this data."
283+
"""
284+
285+
stub:
286+
"""
287+
touch modfreqs.bed
288+
"""
289+
290+
}
291+
244292
process mosdepth {
245293

246294
def depth_software = "mosdepth"
@@ -1251,6 +1299,7 @@ workflow {
12511299
bam = id_tuple.join(files_tuple, by: [0,1])
12521300
}
12531301
if ( in_data_format == 'ubam_fastq' | in_data_format == 'aligned_bam' ) {
1302+
minimod(bam.join(data_type_tuple, by: [0,1]), ref, ref_index, outdir, outdir2, ref_name)
12541303
if ( calculate_depth == 'yes' ) {
12551304
mosdepth(bam.join(regions_of_interest_tuple, by: [0,1]), mosdepth_binary, outdir, outdir2, ref_name)
12561305
}

0 commit comments

Comments
 (0)