Permalink
Browse files

fix pyfasta extract. thanks @ialbert in #5 .

  • Loading branch information...
1 parent 8bb0e51 commit 4fa34b8ab0a360e038b63b22b1cb149e78e0b74c @brentp committed Oct 12, 2011
Showing with 13 additions and 2 deletions.
  1. +4 −0 CHANGELOG.txt
  2. +1 −1 pyfasta/__init__.py
  3. +1 −1 setup.py
  4. +7 −0 tests.sh
View
4 CHANGELOG.txt
@@ -1,5 +1,9 @@
Changes
=======
+0.4.4
+-----
+fix pyfasta extract
+
0.4.3
-----
Add 0 or 1-based intervals in sequence() thanks @jamescasbon
View
2 pyfasta/__init__.py
@@ -122,7 +122,7 @@ def extract(args):
if not (options.fasta and len(seqs)):
sys.exit(parser.print_help())
- key_fn = lambda k: k.split()[0] if options.space else None
+ key_fn = (lambda k: k.split()[0]) if options.space else None
f = Fasta(options.fasta, key_fn=key_fn)
if options.file:
seqs = (x.strip() for x in open(seqs[0]))
View
2 setup.py
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
-version = '0.4.3'
+version = '0.4.4'
setup(name='pyfasta',
version=version,
View
7 tests.sh
@@ -48,3 +48,10 @@ then
fi
rm -f tests/data/three_chrs.fasta.{flat,gdx}
+
+C=$(python pyfasta/__init__.py extract --fasta tests/data/key.fasta "a extra")
+if [ $C != "a" ]
+then
+ echo "BADD"
+fi
+rm -f tests/data/key.fasta.{flat,gdx}

0 comments on commit 4fa34b8

Please sign in to comment.