Skip to content

Commit

Permalink
Merge branch 'hotfix/fix_output' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
moonso committed Dec 12, 2014
2 parents b2793bb + f3ab624 commit b77db2f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
17 changes: 11 additions & 6 deletions genmod/commands/annotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,12 @@ def check_tabix_index(compressed_file, file_type='cadd', verbose=False):
def annotate(family_file, variant_file, family_type, vep, silent, phased, strict, cadd_raw, whole_gene,
annotation_dir, cadd_file, cadd_1000g, cadd_esp, cadd_indels, thousand_g, exac, outfile,
chr_prefix, processes, verbose):
"""Annotate variants in a VCF file.
It is possible to annotate from sources shown as options only
If a ped file is provided then the genetic inheritance patterns for all individuals are followed.
Individuals that are not present in ped file will not be considered in the analysis.
"""Annotate variants in a VCF file.\n
The main function with genmod is to annotate genetic inheritance patterns for variants in families.
Use flag --family together with a .ped file to describe which individuals in the vcf you wish to check inheritance for in the analysis.
Individuals that are not present in the ped file will not be considered in the analysis.\n
It is also possible to use genmod without a family file. In this case the variants will be annotated with a variety of options seen below.
Please see docuentation on github.com/moonso/genmod or genmod/examples/readme.md for more information.
"""
verbosity = verbose

Expand Down Expand Up @@ -248,20 +250,23 @@ def annotate(family_file, variant_file, family_type, vep, silent, phased, strict
if individual not in individuals:
warning.warning('All individuals in ped file must be in vcf file! Aborting...')
warning.warning('Individuals in PED file: %s' % ' '.join(list(family_parser.individuals.keys())))
warning.warning('Individuals in VCF file: %s' % ' '.join(list(variant_parser.individuals)))
warning.warning('Individuals in VCF file: %s' % ' '.join(individuals))
sys.exit()

if verbosity:
if family_file:
print('Starting analysis of families: %s' % ','.join(list(families.keys())))
print('Individuals included in analysis: %s\n' % ','.join(list(individuals.keys())))
print('Individuals included in analysis: %s\n' % ','.join(list(family_parser.individuals.keys())))
######### Connect to the annotations #########

gene_trees = {}
exon_trees = {}

if not vep:

if verbosity:
print('Reading annotations...\n')

gene_db = pkg_resources.resource_filename('genmod', 'annotations/genes.db')
exon_db = pkg_resources.resource_filename('genmod', 'annotations/exons.db')

Expand Down
5 changes: 4 additions & 1 deletion scripts/genmod
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ def print_version(ctx, param, value):
is_eager=True
)
def run_genmod():
"""Annotate genetic models in variant files."""
"""Tool for annotating and analyzing genetic variants in the vcf format.\n
For more information, please run:
genmod COMMAND --help \n
"""
pass

run_genmod.add_command(build_annotation.build_annotation)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# long_description = file.read()

setup(name='genmod',
version='1.8.2',
version='1.8.3',
description='Annotate genetic inheritance models in variant files',
author = 'Mans Magnusson',
author_email = '[email protected]',
Expand Down

0 comments on commit b77db2f

Please sign in to comment.