Skip to content

Instantly share code, notes, and snippets.

@crazyhottommy
Created August 24, 2015 16:38
Show Gist options
  • Select an option

  • Save crazyhottommy/aa19639ab572b3674647 to your computer and use it in GitHub Desktop.

Select an option

Save crazyhottommy/aa19639ab572b3674647 to your computer and use it in GitHub Desktop.
maintain_header_batch_process
# output of mutect run for each chromosome
# the first line is the mutect version, the second line is the header
# keep the header and filter mutect results based on 10th and 35th columns.
for file in *.call.txt
do (sed -n '2p' $file; awk -F "\t" '$10=="COVERED" && $35=="KEEP"' $file) > ./keep/"${file%txt}"keep.txt
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment