Skip to content

Commit

Permalink
Sort and reformat permutation p-values
Browse files Browse the repository at this point in the history
  • Loading branch information
kauralasoo committed Jul 2, 2020
1 parent 348e674 commit 6d60124
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,8 @@ process merge_permutation_batches {

script:
"""
cat ${batch_file_names.join(' ')} | bgzip > ${study_qtl_group}.permuted.txt.gz
cat ${batch_file_names.join(' ')} | csvtk space2tab | sort -k11n -k12n > merged.txt
cut -f 1,6,7,8,10,11,12,18,19,20,21 merged.txt | csvtk add-header -t -n molecular_trait_object_id,molecular_trait_id,n_traits,n_variants,variant,chromosome,position,pvalue,beta,p_perm,p_beta | bgzip > ${study_qtl_group}.permuted.txt.gz
"""
}

Expand Down

0 comments on commit 6d60124

Please sign in to comment.