Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Remove cgat[core] imports and dependencies #104

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 2 additions & 6 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
os: ["ubuntu-latest", "macos-latest"]
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand All @@ -40,10 +40,6 @@ jobs:
pip install --upgrade virtualenv
pip install --upgrade pip setuptools
virtualenv --upgrade-embed-wheels
pip install numpy
pip show numpy
pip install cgatcore
pip install cgat
pip install -e .[tests]
- name: Test with pytest
run: |
Expand Down
18 changes: 2 additions & 16 deletions isoslam/all_introns_counts_and_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,10 @@
about it's event assignment, number of conversions, coverage etc.
"""

from argparse import ArgumentParser
import sys
from collections import defaultdict

import cgat.GTF as GTF
import cgatcore.experiment as E
import cgatcore.iotools as iotools
import pandas as pd
import pysam as pysam

from isoslam import isoslam, io

Expand All @@ -31,25 +27,20 @@ def main(argv=None):
if argv is None:
argv = sys.argv

# setup command line parser
parser = E.ArgumentParser(description=__doc__)

parser = ArgumentParser(description=__doc__)
parser.add_argument(
"-b",
"--bam",
dest="infile_bam",
type=str,
help="Supply a path to the bam file that has undergone read assignment with featureCounts",
)

parser.add_argument(
"-g", "--gtf", dest="gtf_path", type=str, help="Supply a path to the transcript assembly gtf file"
)

parser.add_argument(
"-bed", dest="utron_bed", type=str, help="Supply a path to the utron bed file. Must be bed6 format"
)

parser.add_argument(
"-o",
"--out",
Expand All @@ -58,7 +49,6 @@ def main(argv=None):
help="""Supply a path to the output file. This file will contain
conversions per pair, accounting for stranding""",
)

parser.add_argument("-vcf", "--vcf", dest="vcf_path", type=str, help="""Supply a path to the VCF.gz file""")

argv_as_dictionary = vars(argv)
Expand Down Expand Up @@ -118,8 +108,6 @@ def fragment_iterator(read_iterator):
i_progress += 1

if i_progress == 10000:
# E.debug(str(i_total_progress) + " pairs processed")
# E.debug(str(i) + "spliced/retained pairs processed")
i_progress = 0

read1_start = read1.reference_start
Expand Down Expand Up @@ -506,8 +494,6 @@ def fragment_iterator(read_iterator):
results = pd.concat([results, row])

return results.sort_values(by=["read_uid", "transcript_id", "chr", "start", "end"])
# write footer and output benchmark information.
# E.stop()


if __name__ == "__main__":
Expand Down
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,13 @@ keywords = [
]
dependencies = [
"apsw",
# "cgat",
# "cgatcore",
"gevent",
"loguru",
"matplotlib",
"numpy",
"pandas",
"pysam",
"ruamel.yaml",
# "ruffus",
"sqlalchemy",
]

Expand All @@ -57,6 +54,7 @@ tests = [
"pytest-cov",
"pytest-github-actions-annotate-failures",
"pytest-mpl",
"pytest-regtest",
"pytest-testmon",
"syrupy",
]
Expand Down
Loading