-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
801d2bc
commit a43791a
Showing
1 changed file
with
9 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,25 @@ | ||
#!/usr/bin/env perl | ||
#!/usr/bin/perl | ||
# | ||
# Merge two files into one. | ||
# | ||
# Description: merges two files based on some key-column into one file. The lines do not | ||
# have to be sorted. | ||
# BETA: USE WITH EITHER OR BOTH FILES GZIPPED. | ||
# | ||
# Original written and published by: | ||
# * Paul I.W. de Bakker, [email protected] | ||
# * 4 July 2014 | ||
# Written by: Sander W. van der Laan; UMC Utrecht, Utrecht, the Netherlands; | ||
# [email protected]. | ||
# Version: 1.0 | ||
# Update date: 2016-02-17 | ||
# * 4 July 2009 | ||
# | ||
# Written by: Sander W. van der Laan; Utrecht, the Netherlands; | ||
# [email protected]. | ||
# Version: 2.0 | ||
# Update date: 2017-04-17 | ||
# | ||
# Usage: perl merge_tables.pl --file1 [INPUT_FILE_1] --file2 [INPUT_FILE_2] --index [INDEX_STRING] --format [GZIP1/GZIP2/GZIPB/NORM] (optional: --replace) | ||
|
||
# Starting merging | ||
print STDERR "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"; | ||
print STDERR "+ MERGE TABLES FILES +\n"; | ||
print STDERR "+ V2.0 +\n"; | ||
print STDERR "+ 28-06-2016 +\n"; | ||
print STDERR "+ Written by: Sander W. van der Laan +\n"; | ||
print STDERR "+ +\n"; | ||
print STDERR "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"; | ||
print STDERR "+ \n"; | ||
print STDERR "+ Hello. I am starting the merging of two files.\n"; | ||
|
@@ -58,7 +55,7 @@ | |
# IF STATEMENT TO CHECK CORRECT INPUT | ||
#if ( $IndexStr eq "" || $Table1 eq "" || $Table2 eq "" || $zipped eq "" || $outfile eq "" ) { | ||
if ( $IndexStr eq "" || $Table1 eq "" || $Table2 eq "" || $zipped eq "" ) { | ||
print "Usage: %>merge_tables.pl --file1 datafile_1 --file2 datafile_2 --index index_string --format [GZIP1/GZIP2/GZIPB/NORM] [--replace]\n"; | ||
print "Usage: %>mergeTables.pl --file1 datafile_1 --file2 datafile_2 --index index_string --format [GZIP1/GZIP2/GZIPB/NORM] [--replace]\n"; | ||
print ""; | ||
print "Prints all contents of datafile_2, each row is followed by the corresponding columns from datafile_1 (indexed on index_string).\n"; | ||
print "The argument --format indicates which of the files are gzipped.\n"; | ||
|
@@ -209,7 +206,7 @@ | |
print STDERR "+ \n"; | ||
print STDERR "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"; | ||
print STDERR "+ The MIT License (MIT) +\n"; | ||
print STDERR "+ Copyright (c) 2016 Sander W. van der Laan +\n"; | ||
print STDERR "+ Copyright (c) 2016-2018 Sander W. van der Laan +\n"; | ||
print STDERR "+ +\n"; | ||
print STDERR "+ Permission is hereby granted, free of charge, to any person obtaining a copy of this +\n"; | ||
print STDERR "+ software and associated documentation files (the \"Software\"), to deal in the +\n"; | ||
|