Mercurial > repos > davidmurphy > codonlogo
comparison corebio/seq_io/null_io.py @ 0:c55bdc2fb9fa
Uploaded
| author | davidmurphy |
|---|---|
| date | Thu, 27 Oct 2011 12:09:09 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:c55bdc2fb9fa |
|---|---|
| 1 #!/usr/bin/env python | |
| 2 | |
| 3 # Copyright (c) 2005 Gavin E. Crooks <gec@threeplusone.com> | |
| 4 # | |
| 5 # This software is distributed under the MIT Open Source License. | |
| 6 # <http://www.opensource.org/licenses/mit-license.html> | |
| 7 # | |
| 8 # Permission is hereby granted, free of charge, to any person obtaining a | |
| 9 # copy of this software and associated documentation files (the "Software"), | |
| 10 # to deal in the Software without restriction, including without limitation | |
| 11 # the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
| 12 # and/or sell copies of the Software, and to permit persons to whom the | |
| 13 # Software is furnished to do so, subject to the following conditions: | |
| 14 # | |
| 15 # The above copyright notice and this permission notice shall be included | |
| 16 # in all copies or substantial portions of the Software. | |
| 17 # | |
| 18 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 19 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 20 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 21 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 22 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| 23 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
| 24 # THE SOFTWARE. | |
| 25 # | |
| 26 | |
| 27 """Null sequence IO. Acts like /dev/null. Read returns empty sequences or sequence lists, writes do nothing.""" | |
| 28 | |
| 29 | |
| 30 from corebio.seq import Seq, SeqList | |
| 31 | |
| 32 names = () | |
| 33 extensions = () | |
| 34 | |
| 35 def read(fin, alphabet=None): | |
| 36 assert fin is not None # Do something with arguments to quite pychecker | |
| 37 if alphabet is not None : pass | |
| 38 return SeqList([]) | |
| 39 | |
| 40 def iterseq(fin, alphabet=None) : | |
| 41 assert fin is not None | |
| 42 if alphabet is not None : pass | |
| 43 yield Seq('') | |
| 44 return | |
| 45 | |
| 46 def write(fout, seqs): | |
| 47 assert fout is not None | |
| 48 assert seqs is not None | |
| 49 return | |
| 50 | |
| 51 | |
| 52 def writeseq(fout, seq): | |
| 53 assert fout is not None | |
| 54 assert seq is not None | |
| 55 return | |
| 56 | |
| 57 |
