diff --git a/codes3d/codes3d.py b/codes3d/codes3d.py index 99d0d5f..ef4e1b4 100755 --- a/codes3d/codes3d.py +++ b/codes3d/codes3d.py @@ -747,7 +747,7 @@ def log_settings(args, logger): if args.gene_input: logger.write(f'--gene-input:\t{", ".join(args.gene_input)}') if args.snps_within_gene: - logger.write(f'--snps-within-gebe:\t{args.snps_within_gene}') + logger.write(f'--snps-within-gene:\t{args.snps_within_gene}') logger.write('\n') diff --git a/codes3d/genes.py b/codes3d/genes.py index 09059e1..cea6e11 100755 --- a/codes3d/genes.py +++ b/codes3d/genes.py @@ -207,7 +207,7 @@ def get_gene_by_id( def get_gene_by_position(df, db): gene_df = [] omitted_genes = [] - sql = '''SELECT * FROM genes where chrom = '{}' and start= {} and "end" = {};''' + sql = '''SELECT * FROM genes where chrom = '{}' and start >= {} and "end" <= {};''' with db.connect() as con: for idx, row in df.iterrows(): try: