Entering edit mode
2.7 years ago
User000
▴
710
Dear all,
I have two files. File1.tsv:
CHROM POS REF ALT Allele Consequence IMPACT SYMBOL Gene
chrM 3338 G A A missense_variant MODERATE MT-ND1 ENSG00000198888
chrM 3395 T C C missense_variant MODERATE MT-ND1 ENSG00000198888
Files2.tsv:
CHROM POS REF ALT FILTER nHet nHomAlt nHomRef
chrM 3338 G A PASS 0 1 499
chrM 3395 T C PASS 1 2 497
My desired output is
chrM 3338 G A A missense_variant MODERATE MT-ND1 ENSG00000198888 chrM 3338 G A PASS 0 1 499
chrM 3395 T C C missense_variant MODERATE MT-ND1 ENSG00000198888 chrM 3395 T C PASS 1 2 497
I tired to do a simple paste, but when I do paste file1.txt files2.txt
the columns of the second file start from the new line, when i do paste file2.txt file1.txt
it works. I do not know the reason. Also I would like to take into considerazion the first 4 columns (CHROM, POS,REF,ALT)
, which should match.
check your files are NOT windows files with CR/LF returns with
file your.vcf
How to fix this?
Try
dos2unix
tool. It's present in most of distro repos.Note: tsv-join output looks like joined numbers at the end, but they are not. The numbers are tab separated.
tr -d '\r' < bad.vcf > fixed.vcf
is it possible to integrate it directly in the command line without creating a new file? This does not work..
it's ok. there is no problem here.