Commit 5ac6df6f authored by Venkat Malladi's avatar Venkat Malladi

Fix astrocyte bedtools version. Also consolidated blacklist code.

parent 5a38ef2b
Pipeline #7219 failed with stages
in 404 minutes and 52 seconds
......@@ -547,14 +547,14 @@ process consensusPeaks {
if (blacklist) {
"""
module load python/3.6.1-2-anaconda
module load bedtools/2.26.0
module load bedtools/2.25.0
python3 ${baseDir}/scripts/overlap_peaks.py -d ${peaksDesign} -f ${preDiffDesign} -b ${blacklistFile}
"""
}
else {
"""
module load python/3.6.1-2-anaconda
module load bedtools/2.26.0
module load bedtools/2.25.0
python3 ${baseDir}/scripts/overlap_peaks.py -d ${peaksDesign} -f ${preDiffDesign}
"""
}
......
......@@ -40,8 +40,7 @@ def get_args():
parser.add_argument('-b', '--blacklist',
help="Bed file of blacklisted regions to remove",
required=False,
default="None")
required=False)
args = parser.parse_args()
return args
......@@ -240,17 +239,17 @@ def main():
design_anno = pd.DataFrame(columns=anno_cols)
# Find consenus overlap peaks for each experiment
for experiment, df_experiment in design_peaks_df.groupby('experiment_id'):
replicated_peak, chr_peak = overlap(experiment, df_experiment)
design_diff.loc[design_diff.experiment_id == experiment, "peak"] = replicated_peak
design_anno.loc[experiment] = [experiment, chr_peak]
# Remove blacklist regions; if blacklist = True
if os.path.exists(blacklist):
for experiment, df_experiment in design_peaks_df.groupby('experiment_id'):
for experiment, df_experiment in design_peaks_df.groupby('experiment_id'):
# Remove blacklist regions; if blacklist = True
if blacklist and os.path.exists(blacklist):
bl_peaks, bl_chr_peak = blacklist_peaks(experiment, blacklist)
design_diff.loc[design_diff.experiment_id == experiment, "peak"] = bl_peaks
design_anno.loc[design_anno.Condition == experiment, "Peaks"] = bl_chr_peak
else:
replicated_peak, chr_peak = overlap(experiment, df_experiment)
design_diff.loc[design_diff.experiment_id == experiment, "peak"] = replicated_peak
design_anno.loc[experiment] = [experiment, chr_peak]
# Write out file
design_diff.columns = ['SampleID',
......
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