Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
paulzierep committed Apr 16, 2024
1 parent 0024dfd commit d3e43da
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions tools/maaslin2/maaslin2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,25 @@
## get column names of fixed and random effect from the input file, since galaxy
## can only return indices with type="data_column"
## using awk so that the file is only parsed on command line execution
## get header
#set $input = open(str($input_metadata), 'r')
#set $header = $input.readlines()[0].split('\t')
## get fixed effects
#set $fixed_effects_val = []
#set idx = []
#for $i in $fixed_effects:
#silent $fixed_effects_val.append($header[int($i)])
#silent idx.append(f'${i}')
#end for
#set $fixed_effects = ','.join($fixed_effects_val)
#set idx_for_awk = ','.join(idx)
fixed_effects=`awk -v OFS=',' -F"\t" 'NR == 1 { print $idx_for_awk}' '$input_metadata'` &&
echo 'Assigned fixed effects as:' \$fixed_effects &&
## get random effects
#set $random_effects_val = []
#set idx = []
#for $i in $random_effects:
#silent $random_effects_val.append($header[int($i)])
#silent idx.append(f'${i}')
#end for
#set $random_effects = ','.join($random_effects_val)
#set idx_for_awk = ','.join(idx)
random_effects=`awk -v OFS=',' -F"\t" 'NR == 1 { print $idx_for_awk}' '$input_metadata'` &&
echo 'Assigned random effects as:' \$random_effects &&
ln -s '$input_data' 'input_data.tsv'
&&
Expand All @@ -53,10 +54,10 @@ Maaslin2.R
--analysis_method '$additional_options.analysis_method'
#end if
#if $random_effects
--random_effects '$random_effects'
--random_effects \$random_effects
#end if
#if $fixed_effects
--fixed_effects '$fixed_effects'
--fixed_effects \$fixed_effects
#end if
#if $additional_options.correction
--correction '$additional_options.correction'
Expand Down

0 comments on commit d3e43da

Please sign in to comment.