Workflow: bam-bedgraph-bigwig.cwl

Fetched 2023-01-05 01:10:31 GMT

Workflow converts input BAM file into bigWig and bedGraph files

children parents
Workflow as SVG
  • Selected
  • Default Values
  • Nested Workflows
  • Tools
  • Inputs/Outputs

Inputs

ID Type Title Doc
dutp Boolean (Optional) Enable dUTP

Change strand af the mate read, so both reads come from the same strand

scale Float (Optional) Genome coverage scaling coefficient

Coefficient to scale the genome coverage by a constant factor

split Boolean (Optional) Split reads by 'N' and 'D'

Calculate genome coverage for each part of the splitted by 'N' and 'D' read

strand String (Optional) Enable strand specific genome coverage calculation

Calculate genome coverage of intervals from a specific strand

bam_file File Input BAM file

Input BAM file, sorted by coordinates

pairchip Boolean (Optional) Enable paired-end genome coverage calculation

Enable paired-end genome coverage calculation

fragment_size Integer (Optional) Fixed fragment size

Set fixed fragment size for genome coverage calculation

bigwig_filename String (Optional) bigWig output filename

Output filename for generated bigWig

bedgraph_filename String (Optional) bedGraph output filename

Output filename for generated bedGraph

chrom_length_file File Chromosome length file

Tab delimited chromosome length file: <chromName><TAB><chromSize>

mapped_reads_number Integer (Optional) Mapped reads number

Parameter to calculate scale as 1000000/mapped_reads_number. Ignored by bedtools-genomecov.cwl in bam_to_bedgraph step if scale is provided

Steps

ID Runs Label Doc
sort_bedgraph
../tools/linux-sort.cwl (CommandLineTool)

Tool sorts data from `unsorted_file` by key

`default_output_filename` function returns file name identical to `unsorted_file`, if `output_filename` is not provided.

bam_to_bedgraph
../tools/bedtools-genomecov.cwl (CommandLineTool)

Tool calculates genome coverage from input bam/bed/gff/vcf using `bedtools genomecov`

Depending on `input_file` extension additional prefix is used: if `*.bam` use `-ibam`, else use `-i`.

`scale` and `mapped_reads_number` inputs result in the same parameter `-scale`. If `scale` is not provided, check if `mapped_reads_number` is not null and calculate `-scale` as `1000000/mapped_reads_number`. If both inputs are null, `bedtools genomecov` will use its default scaling value.

`default_output_filename` function returns default output filename and is used when `output_filename` is not provided. Default output file extention is `.tab`. If bedGraph should be generated (check flags `inputs.depth`), extension is updated to `.bedGraph`. Default basename of the output file is generated on the base of `input_file` basename.

sorted_bedgraph_to_bigwig
../tools/ucsc-bedgraphtobigwig.cwl (CommandLineTool)

Tool converts bedGraph to bigWig file.

`default_output_filename` function returns filename for generated bigWig if `output_filename` is not provided. Default filename is generated on the base of `bedgraph_file` basename with the updated to `*.bigWig` extension.

Outputs

ID Type Label Doc
bigwig_file File bigWig output file

bigWig output file

bedgraph_file File bedGraph output file

bedGraph output file

Permalink: https://w3id.org/cwl/view/git/7f5ba081a98fccf9210623d4cef2b5feb7a55e5d/subworkflows/bam-bedgraph-bigwig.cwl