Permalink
Browse files

Write the -p output files naming into a file

  • Loading branch information...
1 parent 414ebf5 commit 40d4be8193c557b70d91412ce6666f341a305572 @pd3 pd3 committed Jul 10, 2012
Showing with 8 additions and 3 deletions.
  1. +1 −1 modules/Vcf.pm
  2. +7 −2 scripts/vcf-isec
View
2 modules/Vcf.pm
@@ -1,6 +1,6 @@
package Vcf;
-our $VERSION = 'r735';
+our $VERSION = 'r761';
# http://vcftools.sourceforge.net/specs.html
# http://www.1000genomes.org/wiki/Analysis/Variant%20Call%20Format/vcf-variant-call-format-version-41
View
9 scripts/vcf-isec
@@ -402,10 +402,15 @@ sub write_line
{
open($$opts{out_files}{$src},"| bgzip -c > $$opts{prefix}$src.vcf.gz") or error("| bgzip -c > $$opts{prefix}$src.vcf.gz: $!");
- print "Using file '$$opts{prefix}$src.vcf.gz' for records present in:\n";
+ if ( !exists($$opts{readme_fh}) )
+ {
+ open($$opts{readme_fh},'>',"$$opts{prefix}_README") or error("$$opts{prefix}_README: $!");
+ print {$$opts{readme_fh}} "# This file was produced by vcf-isec. The command line was:\n#\t",join(' ',@{$$opts{args}}),"\n#\n";
+ }
+ print {$$opts{readme_fh}} "Using file '$$opts{prefix}$src.vcf.gz' for records present in:\n";
for my $rec (sort values %$hash)
{
- print "\t$$rec{vcf}{file}\n";
+ print {$$opts{readme_fh}} "\t$$rec{vcf}{file}\n";
}
if ( !$$vcf{delim} )
{

0 comments on commit 40d4be8

Please sign in to comment.