mskcc / vcf2maf

Convert a VCF into a MAF, where each variant is annotated to only one of all possible gene isoforms
Other
374 stars 217 forks source link

handle file names and paths which contain special characters #331

Closed xnr13 closed 2 years ago

xnr13 commented 2 years ago

add the possibility to have filenames with special characters properly processed. Being a consortium with 20+ participating sites, we have input files naming that are out of control. Sometimes, the command fails because of a simple space or "(". With this pull request, when running the vcf2maf family of scripts, one can use the following in the command line:

contain filename in single quotes: --input-vcf '`-=~!@#$%^&*()_+[]\{}|;'"'"':",.<>?spaceFollows tabFollows .vcf'

contain filename in double quotes: --output-maf "\`-=~"'!'"@#$%^&*()_+[]\{}|;':"'"'",.<>?spaceFollows tabFollows .maf"

or let the bash do it for you: --remap-chain \`-\=~\!\@#\$%\^\&\*\(\)_+\[\]\\\{\}\|\;\'\:\"\,.\<\>\?spaceFollows\ tabFollows\ .chain

Additionally, paths to samtools, liftover and tmp_dir might also contain special characters now.

Known limitations: special chars in vep cache dir are still creating problems, but this is a VEP-problem.

ckandoth commented 2 years ago

I don't envy your job. :) Thanks for the contribution. Merged.