[Swift-user] again about absolute and relative paths

Lorenzo Pesce lpesce at uchicago.edu
Fri Dec 7 14:28:38 CST 2012


Hi --

I have another problem. 

The calculations I working on right now (different from the one I was working on before or before) has this problem:

input files are in say /lustre/beagle/megagenomics/input_files

while my work directory is

/lustre/beagle/lpesce/test

It is easy to connect the input files as strings and pass them down to the apps. No problem.

Now I have a different problem, I want to pass them down as files so I can use them both in direct and staging, depending upon the system.

For all the intermediary and output files, I use a relative path, relative to /lustre/beagle/lpesce/test
for all apps I use absolute paths and that works fine too

e.g. :

export BAMdir="/lustre/beagle/megagenomics"

and from the swift script

string rootFileName [] = ${swiftSampleIDs};

foreach rootf in rootFileName {
       #string inBAM=@strcat("${BAMdir}/",rootf,".bam");
       # Absolute path
       file TCGABAM <single_file_mapper; file=@strcat(${BAMdir},"/",rootf,".bam")>;
       # relative path
       file outBAM <single_file_mapper; file=@strcat(rootf,"/",rootf,".bam")>;
       file outBAMgrp <single_file_mapper; file=@strcat(rootf,"/",rootf,".bam.grp")>;
       file LogGATK <single_file_mapper; file=@strcat(rootf,"/",rootf,".log")>;
       (LogGATK,outBAM,outBAMgrp) = GATKpost (inBAM,rootf);



However, when I use absolute paths for input files, it seems to come out garbled (like the first / is cut, so that it can't find the file). 
Am I missing something in the logic of this?







More information about the Swift-user mailing list