Skip to content

Instantly share code, notes, and snippets.

@mtw
Last active December 20, 2015 19:29
Show Gist options
  • Save mtw/6183914 to your computer and use it in GitHub Desktop.
Save mtw/6183914 to your computer and use it in GitHub Desktop.
Change strands in GFF file
cat ORIG.gff | perl -ne 'chomp; if($_ =~ /^\#/){print $_."\n";next;} my @F = split("\t"); if ($F[6] eq "+"){$F[6] = "-"}else{$F[6] = "+"};my $part1 = join("\t",$F[0],$F[1],$F[2],$F[3],$F[4],$F[5],$F[6],$F[7],$F[8]);print $part1."\n"' > ! AS.gff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment