Support filename with spaces
Doesn't work despite c466156ca469d0f4d20ac21c46155f9d7b89e0ba
FASTA file to format: /passenger/yannick/sequenceserver/databases/query sadf copy.fa
FASTA type: nucleotide
Proceed? [y/n] (Default: y): y
Enter a database title or will use 'query sadf copy':
Enter taxid (optional):
Could not create BLAST database for: /passenger/yannick/sequenceserver/databases/query sadf copy.fa
Tried: makeblastdb -parse_seqids -hash_index -in '/passenger/yannick/sequenceserver/databases/query sadf copy.fa' -dbtype nucl -title 'query sadf copy' -taxid 0
stdout:
stderr: BLAST options error: Please provide a database name using -out
this is very low priority because noone working on a unix machine should ever have spaces in filenames.
This would be a nice-to-have to make it more convenient to allow the tree directory/categories in https://github.com/wurmlab/sequenceserver/issues/520 to have spaces (and other special characters that would be otherwise interpreted by a shell).
I suspect addressing https://github.com/wurmlab/sequenceserver/issues/569 would fix both the security concerns raised in that issue, as well as this issue.
make it more convenient to allow the tree directory/categories in #520 to have spaces (and other special characters that would be otherwise interpreted by a shell).
Fair point.
I suspect addressing #569 would fix both the security concerns raised in that issue, as well as this issue.
I think you're right
this is very low priority because noone working on a unix machine should ever have spaces in filenames.
yea, but we don't develop for a lot of folks who obey posix conventions. Dropbox for instance will add a space to it's default file path.
We'd be more than happy to review a pull request which tries to fix this.
I think this an IgBlast fix. They would need to make their database paths to posix compliant file paths (which they have in their data types for some CLI arguments) rather than strings.
This looks to me like something internal to BLAST.
If I replace spaces with \ , BLAST still gets stuck.
Thus (I think) the best way to solve this is to:
- find fasta file
- replace spaces with underscores
- then do blast formatting.
When the space is early in the pathname (i.e., closer to the root than pwd), then formatting may want to occur elsewhere... e.g. :
- move the fasta file to
/tmp/first. - format there
- move the formatted db back to where we want it
In the meantime, we should probably report an error, saying that we cannot handle this situation well.
(the fix may simply to be explicit about providing -out argument