tab-delimited file - use in bedtools?
1
0
Entering edit mode
4.5 years ago
a.rex ▴ 250

Hi,

I have a tab-delimited .txt file. However, instead of being arranged in columns the values appear like so:

Loci ID Lung proportion   Heart proportion   Kidney proportion^Mloc.40699281     51.70969181     15.88331538^Mloc.14331  5.255465101     86.04853954     8.695995364^M

The ^M seems to indicate where a new line should appear.

I then want to use this file for bedtools intersect with another bedfile containing the locus identities. Is this possible?

Thank you,

bedtools tab-delimited file bedfile • 1.1k views
ADD COMMENT
0
Entering edit mode

Which operating system do you use? Did you prepare this file using a Windows program? Looks like a incorrect newline character. I'm not sure if it will help but you could try dos2unix (it often does work)

ADD REPLY
2
Entering edit mode
4.5 years ago
michael.ante ★ 3.6k

Hi a.rex,

The ^M is a representation of DOS' carriage return character. Just run dos2unix on that file. Since the data is not in bed-format, try to use join (here are some nice examples: https://shapeshed.com/unix-join/ and http://www.thegeekstuff.com/2012/10/15-linux-split-and-join-command-examples-to-manage-large-files/ ) .

Cheers,

Michael

ADD COMMENT

Login before adding your answer.

Traffic: 2500 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6