Commit 20d26c31 authored by Christian Arnold's avatar Christian Arnold

Improved macOS compatibility by removing the -P from the grep command

parent 69d81c46
......@@ -360,17 +360,21 @@ Details
Input metadata
=============================================
This file summarizes the data and corresponding available metadata that should be used for the analysis. The format is flexible and may contain additional columns that are ignored by the pipeline, so it can be used to capture all available information in a single place. Importantly, the file must be saved as tab-separated, the exact name does not matter as long as it is correctly specified in the configuration file. It must contain at least contain the following columns (the exact names do matter):
This file summarizes the data and corresponding available metadata that should be used for the analysis. The format is flexible and may contain additional columns that are ignored by the pipeline, so it can be used to capture all available information in a single place. Importantly, the file must be saved as tab-separated, the exact name does not matter as long as it is correctly specified in the configuration file.
It must contain at least contain the following columns (the exact names do matter):
- ``sampleID``: The ID of the sample
- ``bamReads``: path to the *BAM* file corresponding to the sample.
.. warning:: All *BAM* files must be valid *BAM* files with chromosome names with "*chr*" as prefix. The pipeline may crash if the "*chr*" part is missing.
.. warning:: All *BAM* files must meet *SAM* format specifications. You may use the program *ValidateSamFile* from the *Picard tools* to check and identify problems with your file. Chromosome names must have a "*chr*" as prefix, otherwise diffTF may crash.
- ``peaks``: absolute path to the sample-specific peak file, in the format as given by ``peakType`` (:ref:`parameter_peakType`). Only needed if no consensus peak file is provided.
- ``conditionSummary``: String with an arbitrary condition name that defines which condition the sample belongs to. There must be only exactly two different conditions across all samples (e.g., *mutated and unmutated*, *day0 and day10*, ...)
- if applicable, all additional variables from the design formula except ``conditionSummary`` must also be present as a separate column.
.. warning:: Do not change the samples data after you started an analysis. You may introduce inconsistencies that will result in error messages. If you need to alter the sample data, we strongly advise to recalculate all steps in the pipeline.
Output
************************************************************
......
......@@ -290,7 +290,7 @@ rule filterSexChromosomesAndSortPeaks:
message: "{ruleDisplayMessage}Filter sex and unassembled chromosomes..."
threads: 1
shell: """
grep -vP "^chrX|^chrY|^chrM|^chrUn|random|hap|_gl" {input.consensusPeaks} > {output.consensusPeaks_filtered} &&
grep -v "^chrX\|^chrY\|^chrM\|^chrUn\|random\|hap\|_gl" {input.consensusPeaks} > {output.consensusPeaks_filtered} &&
sort -k1,1 -k2,2n {output.consensusPeaks_filtered} > {output.consensusPeaks_sorted}
"""
......@@ -409,7 +409,7 @@ rule intersectTFBSAndBAM:
ulimitMax = ulimitMax
shell:
""" ulimit -n {params.ulimitMax} &&
zgrep -P "{wildcards.TF}_TFBS\.sorted" {input.bed} |
zgrep "{wildcards.TF}_TFBS\.sorted" {input.bed} |
awk 'BEGIN {{ OFS = "\\t" }} {{print $4"_"$2"-"$3,$1,$2,$3,$6}}' | sort -u -k1,1 >{output.saf} &&
featureCounts \
-F SAF \
......@@ -515,7 +515,7 @@ rule calcNucleotideContent:
params: refGenome = config["additionalInputFiles"]["refGenome_fasta"]
shell:
"""
zcat {input.motifsBed} | grep -P "^{wildcards.perm}\\t" | awk '{{OFS="\\t"}};{{print $3,$4,$5,$6,$2}}' | gzip -f > {output.bedTemp} &&
zcat {input.motifsBed} | grep "^{wildcards.perm}\\t" | awk '{{OFS="\\t"}};{{print $3,$4,$5,$6,$2}}' | gzip -f > {output.bedTemp} &&
bedtools nuc -fi {params.refGenome} -bed {output.bedTemp} | gzip -f > {output.bed}
"""
......@@ -576,7 +576,7 @@ rule cleanUpLogFiles:
params: dir = LOG_BENCHMARK_DIR
shell:
"""
grep -iP "^WARN" {params.dir}/*.log > {output.warnLog} || true &&
grep -iP "^FATAL" {params.dir}/*.log > {output.errorLog} || true &&
grep -i "^WARN" {params.dir}/*.log > {output.warnLog} || true &&
grep -i "^FATAL" {params.dir}/*.log > {output.errorLog} || true &&
rm {params.dir}/*.out {params.dir}/*.err || true
"""
Markdown is supported
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