title: gnu parallel not recognize user-defined functions
body: <p>I cannot get the gnu parallel function to implement a custom function that I built.</p>
  
  <p>My function is:</p>
  
  <pre><code>function run_cuffLinks() {
      inputBAM="${HOME}/Analyses/P_miniata/CleanUpPipeline/TH_${1}/${1}.realigned.bam"
      if [[ ! -f $inputBAM ]]; then echo -e "$inputBAM could not be found\nexit 1" ; fi 
      WORKING_DIR="${HOME}/data/CuffLinks/TH_$1"
      if [[ ! -d $WORKING_DIR ]]; then mkdir -p $WORKING_DIR; fi
  
      REF="${HOME}/ReferenceSequences/GATK_pmin.scaf.fa"
      if [[ ! -f $REF ]]; then echo -e "$inputBAM could not be found\nexit 1" ; exit 1; fi 
  
      GTF_FILE="${HOME}/ReferenceSequences/genes.sorted.gff3"    
      if [[ ! -f $GTF_FILE ]]; then echo -e "$inputBAM could not be found\nexit 1" ; exit 1; fi 
  
      cufflinks \
      --output-dir $WORKING_DIR \
      --num-threads 2 \
      --frag-len-mean 100 \
      --GTF-guide $GTF_FILE \
      --frag-bias-correct $REF \
      -L "HH" \
      $inputBAM ;
  }
  </code></pre>
  
  <p>When I enter: </p>
  
  <pre><code>parallel --no-notice -j+2 run_cuffLinks {} ::: sample1 sample2 sample3
  </code></pre>
  
  <p>I get the output:</p>
  
  <pre><code>/bin/bash: run_cuffLinks: command not found
  /bin/bash: run_cuffLinks: command not found
  /bin/bash: run_cuffLinks: command not found
  </code></pre>
  
  <p>If I include a '$' symbol in front of the function name, I get:</p>
  
  <pre><code>/bin/bash: sample1: command not found
  /bin/bash: sample2: command not found
  /bin/bash: sample3: command not found
  </code></pre>
  
  <p>I have also tried using the -pipe --recend and --rrs options, but without a positive result. 
  Is GNU parallel not able to process user-defined functions? </p>