Question: tab-delimited file - use in bedtools?
0
gravatar for a.rex
2.9 years ago by
a.rex190
a.rex190 wrote:

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,

ADD COMMENTlink modified 2.9 years ago by michael.ante3.4k • written 2.9 years ago by a.rex190

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 REPLYlink written 2.9 years ago by WouterDeCoster41k
2
gravatar for michael.ante
2.9 years ago by
michael.ante3.4k
Austria/Vienna
michael.ante3.4k wrote:

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 COMMENTlink modified 2.9 years ago • written 2.9 years ago by michael.ante3.4k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1835 users visited in the last hour