Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def check_provided(distribution, min_version, max_version=None, optional=False):
author_email='[email protected]',
url="https://github.com/BD2KGenomics/toil-scripts",
install_requires=[
'toil-lib==1.0.2',
'tqdm==3.8.0', # FIXME: Remove once ADAM stops using it (superfluous import)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small aside, but I think we can get rid of the tqdm requirement. I don't see it used anywhere in the codebase.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be great

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just remove it in this PR?

'pyyaml==3.11'],
tests_require=[
Expand Down
2 changes: 1 addition & 1 deletion src/toil_scripts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

_log = logging.getLogger(__name__)

# TODO: replace this with toil_scripts.lib.urls._download_s3_url
# TODO: replace this with toil_lib.urls._download_s3_url

def download_from_s3_url(file_path, url):
from urlparse import urlparse
Expand Down
5 changes: 2 additions & 3 deletions src/toil_scripts/adam_gatk_pipeline/align_and_call.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,10 @@

# import from python system libraries
import argparse
import copy
import textwrap
import copy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lex sort imports; this one shouldn't have moved.

from multiprocessing import cpu_count

import yaml
# import toil features
from toil.job import Job
# these don't seem necessary! but, must be imported here due to a serialization issue
Expand All @@ -130,7 +129,7 @@
from toil_scripts.gatk_processing.gatk_preprocessing import * #download_gatk_files
from toil_scripts.rnaseq_cgl.rnaseq_cgl_pipeline import generate_file

from toil_scripts.lib.programs import mock_mode
from toil_lib.programs import mock_mode
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toil_lib imports should be ahead of toil_scripts imports.


def sample_loop(job, uuid_list, inputs):
"""
Expand Down
4 changes: 2 additions & 2 deletions src/toil_scripts/adam_kmers/count_kmers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
from toil.lib.spark import spawn_spark_cluster

# imports from toil_scripts
from toil_scripts.lib import require
from toil_scripts.tools.spark_tools import call_adam, call_conductor, \
from toil_lib import require
from toil_lib.tools.spark_tools import call_adam, call_conductor, \
MasterAddress, HDFS_MASTER_PORT, SPARK_MASTER_PORT


Expand Down
8 changes: 4 additions & 4 deletions src/toil_scripts/adam_pipeline/adam_preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
from toil.job import Job
from toil.lib.spark import spawn_spark_cluster

from toil_scripts.lib import require
from toil_scripts.lib.files import copy_files, move_files
from toil_scripts.lib.programs import docker_call, mock_mode
from toil_lib import require
from toil_lib.files import copy_files, move_files
from toil_lib.programs import docker_call, mock_mode
from toil_scripts.rnaseq_cgl.rnaseq_cgl_pipeline import generate_file
from toil_scripts.tools.spark_tools import call_adam, call_conductor, MasterAddress, HDFS_MASTER_PORT, SPARK_MASTER_PORT
from toil_lib.tools.spark_tools import call_adam, call_conductor, MasterAddress, HDFS_MASTER_PORT, SPARK_MASTER_PORT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toil_lib imports should be ahead of toil_scripts imports.


log = logging.getLogger(__name__)

Expand Down
12 changes: 6 additions & 6 deletions src/toil_scripts/bwa_alignment/bwa_alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

import yaml
from toil.job import Job
from toil_lib import require, required_length
from toil_lib.files import copy_file_job
from toil_lib.jobs import map_job
from toil_lib.tools.aligners import run_bwakit
from toil_lib.tools.indexing import run_samtools_faidx, run_bwa_index
from toil_lib.urls import download_url_job, s3am_upload_job

from toil_scripts.lib import require, required_length
from toil_scripts.lib.files import copy_file_job
from toil_scripts.lib.jobs import map_job
from toil_scripts.lib.urls import download_url_job, s3am_upload_job
from toil_scripts.rnaseq_cgl.rnaseq_cgl_pipeline import generate_file
from toil_scripts.tools.aligners import run_bwakit
from toil_scripts.tools.indexing import run_samtools_faidx, run_bwa_index


def download_reference_files(job, inputs, samples):
Expand Down
23 changes: 11 additions & 12 deletions src/toil_scripts/exome_variant_pipeline/exome_variant_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,17 @@
from bd2k.util.files import mkdir_p
from bd2k.util.processes import which
from toil.job import Job

from toil_scripts.lib import require
from toil_scripts.lib.files import copy_files
from toil_scripts.lib.jobs import map_job
from toil_scripts.lib.urls import download_url_job, s3am_upload
from toil_scripts.tools.mutation_callers import run_muse
from toil_scripts.tools.mutation_callers import run_mutect
from toil_scripts.tools.mutation_callers import run_pindel
from toil_scripts.tools.preprocessing import run_gatk_preprocessing
from toil_scripts.tools.preprocessing import run_picard_create_sequence_dictionary
from toil_scripts.tools.preprocessing import run_samtools_faidx
from toil_scripts.tools.preprocessing import run_samtools_index
from toil_lib import require
from toil_lib.files import copy_files
from toil_lib.jobs import map_job
from toil_lib.tools.mutation_callers import run_muse
from toil_lib.tools.mutation_callers import run_mutect
from toil_lib.tools.mutation_callers import run_pindel
from toil_lib.tools.preprocessing import run_gatk_preprocessing
from toil_lib.tools.preprocessing import run_picard_create_sequence_dictionary
from toil_lib.tools.preprocessing import run_samtools_faidx
from toil_lib.tools.preprocessing import run_samtools_index
from toil_lib.urls import download_url_job, s3am_upload


# Start of Job Functions
Expand Down
7 changes: 4 additions & 3 deletions src/toil_scripts/gatk_germline/germline.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@

import yaml
from toil.job import Job
from toil_lib import require
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 line of whitespace between toil and toil_lib imports? (I thought that was the policy, but can't remember)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran optimize imports before realizing it messed up the align_and-call pipeline's imports, so I just did a quick find-and-replace. I'll go back and do that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PyCharm's optimize imports feature doesn't put a space there, but puts 1 line of whitespace between that block and toil_scripts. Do you have a preference?

from toil_lib.programs import docker_call
from toil_lib.urls import s3am_upload

from toil_scripts import download_from_s3_url
from toil_scripts.lib import require
from toil_scripts.lib.programs import docker_call
from toil_scripts.lib.urls import s3am_upload
from toil_scripts.rnaseq_cgl.rnaseq_cgl_pipeline import generate_file


Expand Down
6 changes: 3 additions & 3 deletions src/toil_scripts/gatk_processing/gatk_preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
import yaml
from toil.job import Job
from toil_scripts import download_from_s3_url
from toil_scripts.lib import require
from toil_scripts.lib.programs import docker_call
from toil_scripts.lib.urls import s3am_upload
from toil_lib import require
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toil_lib imports should be ahead of toil_scripts imports.

from toil_lib.programs import docker_call
from toil_lib.urls import s3am_upload
from toil_scripts.rnaseq_cgl.rnaseq_cgl_pipeline import generate_file

_log = logging.getLogger(__name__)
Expand Down
63 changes: 0 additions & 63 deletions src/toil_scripts/lib/__init__.py

This file was deleted.

107 changes: 0 additions & 107 deletions src/toil_scripts/lib/files.py

This file was deleted.

23 changes: 0 additions & 23 deletions src/toil_scripts/lib/jobs.py

This file was deleted.

Loading