Skip to content

Commit

Permalink
repackage sgains
Browse files Browse the repository at this point in the history
  • Loading branch information
lchorbadjiev committed Nov 6, 2018
1 parent c6c53df commit 55aac5d
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 258 deletions.
9 changes: 0 additions & 9 deletions scripts/Makefile

This file was deleted.

Binary file removed scripts/SCclust-1.0.0RC2.tar.gz
Binary file not shown.
Binary file removed scripts/SCclust-1.0.0RC3.tar.gz
Binary file not shown.
221 changes: 0 additions & 221 deletions scripts/conda-environment.yml

This file was deleted.

9 changes: 0 additions & 9 deletions scripts/setup.R

This file was deleted.

24 changes: 16 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,22 @@
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/KrasnitzLab/sgains",
packages=setuptools.find_packages(
# 'sgains',
exclude=[
'docs', 'tests',
'commands.tests',
'pipeline.tests',
]
),
# packages=setuptools.find_packages(
# # 'sgains',
# exclude=[
# 'docs', 'tests',
# 'commands.tests',
# 'pipeline.tests',
# ]
# ),
packages=['sgains', 'sgains.commands', 'sgains.pipelines'],
package_dir={
'sgains': 'sgains',
},
package_data={
'sgains': ['scripts/*.R'],
},
include_package_data=True,
entry_points={
'console_scripts': [
'sgains-tools=sgains.cli:main',
Expand Down
18 changes: 11 additions & 7 deletions sgains/pipelines/r_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
@author: lubo
'''
import subprocess
from sgains.config import Config, NonEmptyWorkDirectory
import os
from termcolor import colored
import sys

import shutil
import subprocess

from termcolor import colored

from sgains.config import Config, NonEmptyWorkDirectory


class Rpipeline(object):
Expand Down Expand Up @@ -65,15 +69,15 @@ def run(self):
rscript = os.path.abspath(
os.path.join(
basedir,
'../../'
'../'
'scripts/pipeline.R'
))
print(colored("executing Rscript with: {}".format(rscript), "yellow"))

if not self.config.dry_run:
with open(os.devnull, 'w') as shutup:

assert os.path.exists(rscript)
assert os.path.exists(rscript), rscript
subprocess.check_call(
[
'Rscript', rscript,
Expand All @@ -86,8 +90,8 @@ def run(self):
str(sharemin)
],
shell=False,
# stdout=sys.stdout, stderr=sys.stdout,
stdout=shutup, stderr=shutup,
stdout=sys.stdout, stderr=sys.stdout,
# stdout=shutup, stderr=shutup,
)


Expand Down
8 changes: 4 additions & 4 deletions scripts/pipeline.R → sgains/scripts/pipeline.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
library("SCclust")
library("futile.logger")
# library("futile.logger")

options(echo=TRUE)

flog.threshold(DEBUG)
flog.info("running sgains scclust pipeline script")
# flog.threshold(DEBUG)
# flog.info("running sgains scclust pipeline script")

args <- commandArgs(trailingOnly = TRUE)

Expand All @@ -23,7 +23,7 @@ nsim <- as.integer(args[7])
sharemin <- as.double(args[8])


flog.debug("varbin_dir:", varbin_dir)
# flog.debug("varbin_dir:", varbin_dir)

sgains_pipeline(
scgv_dir, case_name,
Expand Down

0 comments on commit 55aac5d

Please sign in to comment.