How to properly write paths with the CLI and dx?

I am using the command line interface with the objective of running the swiss army knife app and a samtools command to all the WGS CRAM files in this folder: /Bulk/GATK and GraphTyper WGS/Whole genome GATK CRAM files and indices [500k release]/   however, I am having trouble with the path structure in the terminal. I can't find a way to change directory when I use dx cd probably due to the spaces in the folder names and me not finding a way to get around it. I have tried using single or double quotes and using '\' after each space but these don't work so far.

Comments

1 comment

  • For an earlier release of the GWS data, I wrote a qucik dx script to list all the vcf files for a given chromosome, sort them on ascending order and then write aout a file for the samtools merge command. You can find it here:

     

    https://github.com/pjgreer/ukb-rap-tools/blob/main/ukb-vcf-list.sh

     

    for that earlier relese I would list all vcf segments for a given chromosome (chr20 in this case) with this command:

     

    dx ls Bulk/Whole\ genome\ sequences/Whole\ genome\ GraphTyper\ joint\ call\ pVCF/*_c20_*gz 

     

    I suspect you may be having issues with the "[" in the foldername.

     

    In that case Try to wildcard it:

     

    dx ls Bulk/GATK\ and\ GraphTyper\ WGS/Whole\ genome\ GATK\ CRAM\ file*/ 

     

    Let us know if this helps.

     

    -Phil

    0

Please sign in to leave a comment.