Update: get_mim_file(): Now adding .txt at the end of file_name param is optional. Usages updated to leave it off.
Update: get_mim_file(): Now filters comments out before returning lines. For now, left code appearing later on which also filters out any lines starting with #.
Update: get_mim_file(): Now correctly converts all .txt to .tsv in a more stable way, using new function convert_txt_to_tsv().
Additional info
@twhetzel I want to do some analysis of mimTitles for #119. But I did not have a TSV to work with. This PR primarily fixes that for mimTitles, and also now (i) ensures every .txt has a readable .tsv, and (ii) future proofs code by replacing some hard-coded headers.
I may also need this as a prerequisite for #119 because it'll be easier to work with a dataframe/TSV for this.
Changes
IO misc refactoring & upgrades
Additional info
@twhetzel I want to do some analysis of
mimTitles
for #119. But I did not have a TSV to work with. This PR primarily fixes that formimTitles
, and also now (i) ensures every.txt
has a readable.tsv
, and (ii) future proofs code by replacing some hard-coded headers. I may also need this as a prerequisite for #119 because it'll be easier to work with a dataframe/TSV for this.