Skip to content

Commit

Permalink
drop unused imports due to deepblue drop, flake fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
WardDeb committed Dec 1, 2023
1 parent 80b646b commit eb4ea28
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 26 deletions.
4 changes: 1 addition & 3 deletions deeptools/bigwigAverage.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse # to parse command line arguments
import argparse
import sys
import multiprocessing
import os
import numpy as np
from deeptools import parserCommon
from deeptools import writeBedGraph_bam_and_bw
Expand Down
5 changes: 1 addition & 4 deletions deeptools/bigwigCompare.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse # to parse command line arguments
import sys
import multiprocessing
import os
import argparse
from deeptools import parserCommon
from deeptools.getRatio import getRatio
from deeptools import writeBedGraph_bam_and_bw
Expand Down
15 changes: 6 additions & 9 deletions deeptools/computeMatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

import argparse
import sys
import os
import multiprocessing

from deeptools.parserCommon import writableFile, numberOfProcessors
from deeptools import parserCommon
from deeptools import heatmapper
Expand Down Expand Up @@ -47,11 +44,12 @@ def parse_arguments(args=None):
subparsers.add_parser(
'scale-regions',
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
parents=[computeMatrixRequiredArgs(),
computeMatrixOutputArgs(),
computeMatrixOptArgs(case='scale-regions'),
parserCommon.gtf_options()
],
parents=[
computeMatrixRequiredArgs(),
computeMatrixOutputArgs(),
computeMatrixOptArgs(case='scale-regions'),
parserCommon.gtf_options()
],
help="In the scale-regions mode, all regions in the BED file are "
"stretched or shrunken to the length (in bases) indicated by the user.",
usage='An example usage is:\n computeMatrix scale-regions -S '
Expand Down Expand Up @@ -421,4 +419,3 @@ def main(args=None):

if args.outFileSortedRegions:
hm.save_BED(args.outFileSortedRegions)

20 changes: 10 additions & 10 deletions deeptools/multiBigwigSummary.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import argparse
import os.path
import numpy as np
import multiprocessing
from deeptools import parserCommon
from deeptools.utilities import smartLabels
import deeptools.getScorePerBigWigBin as score_bw
Expand Down Expand Up @@ -54,10 +53,11 @@ def parse_arguments(args=None):
subparsers.add_parser(
'bins',
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
parents=[multiBigwigSummaryArgs(case='bins'),
parent_parser,
parserCommon.gtf_options(suppress=True)
],
parents=[
multiBigwigSummaryArgs(case='bins'),
parent_parser,
parserCommon.gtf_options(suppress=True)
],
help="The average score is based on equally sized bins "
"(10 kilobases by default), which consecutively cover the "
"entire genome. The only exception is the last bin of a chromosome, which "
Expand All @@ -73,10 +73,11 @@ def parse_arguments(args=None):
subparsers.add_parser(
'BED-file',
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
parents=[multiBigwigSummaryArgs(case='BED-file'),
parent_parser,
parserCommon.gtf_options()
],
parents=[
multiBigwigSummaryArgs(case='BED-file'),
parent_parser,
parserCommon.gtf_options()
],
help="The user provides a BED file that contains all regions "
"that should be considered for the analysis. A "
"common use is to compare scores (e.g. ChIP-seq scores) between "
Expand Down Expand Up @@ -278,4 +279,3 @@ def main(args=None):
args.outRawCounts.write(fmt.format(*tuple(row)))
"""
f.close()

1 change: 1 addition & 0 deletions deeptools/parserCommon.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,7 @@ def heatmapperOptionalArgs(mode=['heatmap', 'profile'][0]):
action='store_true')
return parser


def requiredLength(minL, maxL):
"""
This is an optional action that can be given to argparse.add_argument(..., nargs='+')
Expand Down

0 comments on commit eb4ea28

Please sign in to comment.