Open carreter opened 11 months ago
Do you have any specific cases where this is useful? Is it like for, switching \r
to \n
?
Yes, \r
and \r\n
to \n
.
Have you found any bioinformatics files that have \r
and are so problematic?
No, but I'm mostly thinking about making sure clients on MacOS, which IIRC we support, can parse files without worrying about normalizing the \r
newlines to \n
themselves.
I see, so it would solve something like #301 . The thing I'm worried about is adding a whole generic intermediate to the parsers - I think it'd reduce readability. The tradeoffs might be worth it if we could support windows though (I use mac pretty often and haven't had this problem)
Hmm. I'm blanking on other ways to structure this that doesn't involve adding an intermediate. IMO we should wire this in in all the NewXXXParserWithMaxLine
functions in bio/bio.go
, this would minimally impact readability of the format-specific parsers themselves.
We can't put it in bio/bio.go
though because it would be a circular import, but I'm sure we could put it in some utils location. Once we get ioToBio, we should revisit this for actual integration
I don't think there would be an import cycle. Regardless, I'm going to switch this to a draft PR until #339 is merged. Once it is, this wrapper con go in a new ioutils
package:
bio/
├── util.go
└── specificFormat/
├── parser.go
└── types.go
ioutils/
└── util.go
This comment was automatically written by the Blocking Issues bot, and this PR will be monitored for further progress.
This PR has had no activity in the past 2 months. Marking as stale
.
Will be useful for cross-platform support.
Blocked by #339