How can I run regenie step 2 for all 22 chromosomes at once? I would like regenie to spit out a single output file with gwas summary stats for all 22 chromosomes if feasible. Thanks Former User of DNAx Community_96 12 March 2022 00:00 1 comment Comments 1 comment Sort by Date Votes Anastazie Sedlakova DNAnexus Team 17 March 2022 17:49 Hello, on our GWAS visualization webinar we were showing how you can preprocess regenie output, so that all results are in one file. Here is example code that you can use: # Concatenate files, assuming all regenie output files are in one directoryzcat assoc.c1_diabetes_cc.regenie.gz | head -1 > assoc.all.regeniefind *.gz -exec sh -c "zcat {} | tail -n +2 -f " \; >> assoc.all.regenie # Add `#` to the headersed '1 s/./#&/' assoc.all.regenie > assoc_edit.all.regenie # Convert file from space to tab-separatedsed 's/ /\t/g' assoc_edit.all.regenie > multiple_assoc_edit_tab.all.regenie 0 Please sign in to leave a comment.
Comments
1 comment
Hello,
on our GWAS visualization webinar we were showing how you can preprocess regenie output, so that all results are in one file.
Here is example code that you can use:
# Concatenate files, assuming all regenie output files are in one directory
zcat assoc.c1_diabetes_cc.regenie.gz | head -1 > assoc.all.regenie
find *.gz -exec sh -c "zcat {} | tail -n +2 -f " \; >> assoc.all.regenie
# Add `#` to the header
sed '1 s/./#&/' assoc.all.regenie > assoc_edit.all.regenie
# Convert file from space to tab-separated
sed 's/ /\t/g' assoc_edit.all.regenie > multiple_assoc_edit_tab.all.regenie
Please sign in to leave a comment.