Skip to content

Commit

Permalink
v0.8.7
Browse files Browse the repository at this point in the history
  • Loading branch information
frankvogt committed Apr 29, 2022
1 parent 7af0a48 commit 073f7b9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 51 deletions.
31 changes: 1 addition & 30 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@

#{% set name = "vcf2gwas" %}
#{% set version = "0.6.4" %}
{% set data = load_setup_py_data() %}

package:
Expand All @@ -9,61 +6,35 @@ package:

source:
git_url: https://github.com/frankvogt/vcf2gwas.git
# url: https://github.com/frankvogt/vcf2gwas/releases/download/{{ version }}/vcf2gwas-{{ version }}.tar.gz

build:
# If the installation is complex, or different between Unix and Windows, use
# separate bld.bat and build.sh files instead of this key. Add the line
# "skip: True # [py<35]" (for example) to limit to Python 3.5 and newer, or
# "skip: True # [not win]" to limit to Windows.
number: 0
script: "{{ PYTHON }} -m pip install . -vv"
# script: {{ PYTHON }} -m pip install --no-deps --ignore-installed -vv .
noarch: python

entry_points:
# - vcf2gwas = vcf2gwas.__main__:main
# - install_vcf2gwas = vcf2gwas.install:main
{% for entry in data['entry_points']['console_scripts'] %}
- {{ entry.split('=')[0].strip() }} = {{ entry.split('=')[1].strip() }}
{% endfor %}


requirements:
# if you need compilers, uncomment these
# read more at https://docs.conda.io/projects/conda-build/en/latest/resources/compiler-tools.html
# build:
# - {{ compilers('c') }}
host:
- python==3.9
- pip

run:
- python==3.9


# dependencies are defined in setup.py
{% for dep in data['install_requires'] %}
- {{ dep.lower() }}
{% endfor %}
#{# raw is for ignoring templating with cookiecutter, leaving it for use with conda-build #}

test:
#source_files:
#- tests
#requires:
#- pytest
#- pytest-cov
#imports:
# - utils.py
# - parsing.py
#commands:
# - test_vcf2gwas

about:
home: https://github.com/frankvogt/vcf2gwas
summary: Python API for comprehensive GWAS analysis using GEMMA
license: GNUv3
#license: {{ data.get('license') }}
license: {{ data.get('license') }}
license_file: LICENSE
dev_url: https://github.com/frankvogt/vcf2gwas
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

setup(
name='vcf2gwas',
version='0.8.6',
version='0.8.7',
description="Python API for comprehensive GWAS analysis using GEMMA",
license="GNUv3",
author="Frank Vogt",
Expand Down
13 changes: 1 addition & 12 deletions vcf2gwas/install.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import subprocess
import os
import shutil

Expand All @@ -22,16 +21,7 @@
"""

def main():
#print("Checking environment.. \nUpdating dependencies..")
#env_name = os.environ["CONDA_DEFAULT_ENV"]
#subprocess.run(["conda", "env", "update", "-n", env_name, "-f", os.path.join(os.path.dirname(__file__), 'environment.yml')])
#try:
# #subprocess.run(["pip", "install", "umap-learn"])
# subprocess.run(["conda", "env", "create", "-f",
# os.path.join(os.path.dirname(__file__), 'environment.yml')])
#except Exception as e:
# print(e)
#print("Environment is now up to date")

print("Copying example input files to current working directory..")
try:
os.mkdir("input")
Expand All @@ -43,4 +33,3 @@ def main():
print("Copying README and LICENSE files..")
shutil.copy(os.path.join(os.path.dirname(__file__), 'README.pdf'), 'README.pdf')
shutil.copy(os.path.join(os.path.dirname(__file__), 'LICENSE'), 'LICENSE')
#print("Installation complete\n")
2 changes: 1 addition & 1 deletion vcf2gwas/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from psutil import virtual_memory

def set_version_number():
return "0.8.6"
return "0.8.7"

def getArgs(argv=None):
"""Description:
Expand Down
12 changes: 5 additions & 7 deletions vcf2gwas/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
along with vcf2gwas. If not, see <https://www.gnu.org/licenses/>.
"""

from vcf2gwas.parsing import Parser
#from vcf2gwas.parsing import Parser
from parsing import *

import os
import subprocess
Expand Down Expand Up @@ -80,9 +81,7 @@

from parsing import *

sns.set_style('white')
#sns.set_style('ticks')
#os.chdir(os.path.dirname(os.path.abspath(__file__)))
sns.set_theme(style='white', palette='deep')

#set fontsize
argvals = None
Expand All @@ -99,7 +98,6 @@
plt.rc('axes', linewidth=fontsize5)
plt.rc('xtick.major', width=fontsize5, size=fontsize4)
plt.rc('ytick.major', width=fontsize5, size=fontsize4)
sns.set_color_codes()

############################## Functions ##############################

Expand Down Expand Up @@ -1605,7 +1603,7 @@ def format_data(prefix, case, pcol, path, sep='\t', chromosome='chr'):
data_grouped = data.groupby((chromosome))
return data, data_grouped

def manh_plot(df, Log, prefix, pcol, path, sigval, x, nolabel, colors = ['#E24E42', '#008F95'], refSNP = False):
def manh_plot(df, Log, prefix, pcol, path, sigval, x, nolabel, colors = ['#4C72B0', '#C44E52'], refSNP = False):
"""Description:
creates manhattan plot from prepared dataframe and saves plot
based on: https://github.com/Pudkip/Pyhattan/blob/master/Pyhattan/__init__.py"""
Expand Down Expand Up @@ -2759,4 +2757,4 @@ def rangeTrans(y):
return (y - np.nanmin(y))/(np.nanmax(y) - np.nanmin(y))

def standTrans(y):
return (y - np.nanmean(y))/np.nanstd(y, ddof=1)
return (y - np.nanmean(y))/np.nanstd(y, ddof=1)

0 comments on commit 073f7b9

Please sign in to comment.