BioJulia / Bio.jl

[DEPRECATED] Bioinformatics and Computational Biology Infrastructure for Julia
http://biojulia.dev
MIT License
261 stars 63 forks source link

Move file format readers and writers in separated modules. #401

Closed bicycle1885 closed 6 years ago

bicycle1885 commented 7 years ago

Since we've deprecated type names (e.g. FASTA) of file formats in Bio.jl 0.4, we can use these for names of submodules. For example, Bio.Seq.FASTAReader can be Bio.Seq.FASTA.Reader, which looks easier to read to me.


TODO list of this issue:

TransGirlCodes commented 7 years ago

This sounds much better in terms of naming, but would there be a change for name conflicts if someone wants to import say Bio.Seq.FASTA.Reader, and Bio.Seq.FASTQ.Reader?

TransGirlCodes commented 7 years ago

Oh I think I know what you mean now, FASTAReader is still called FASTAReader, it is just in the Bio.Seq.FASTA.Reader module.

bicycle1885 commented 7 years ago

No, FASTAReader will be FASTA.Reader. No conflict will happen if we don't export Reader from each module. So, actual code will look like this:

using Bio.Seq

reader = open(FASTA.Reader, "data.fasta")
# or more explicitly: open(Bio.Seq.FASTA.Reader, "data.fasta")
for record in reader
   # ...
end
bicycle1885 commented 7 years ago
TransGirlCodes commented 6 years ago

This has been completed, so I will close to help clear the issues list.