bedtools, linux, rnaseq
2
0
Entering edit mode
8.1 years ago
Daniel James ▴ 10

I have 6 files where I have the number of reads mapping to each gene on chr22. and a a Rnagene file which has number of reads mapping every gene. How do I create a tab delineated file contianing the number of reads mapping to each gene on chr22 using coverage bed ?

linux coveragebed RNA-Seq • 1.6k views
ADD COMMENT
0
Entering edit mode
8.1 years ago

join, a little python script, a little perl script, R, grep, etc.

There are many ways to do this. What have you tried that didn't work?

ADD COMMENT
0
Entering edit mode

i did it using join but I am unable to add a header to the table

ADD REPLY
1
Entering edit mode

The join tool glues columns. You could use a different tool to write a header, such as awk, echo, Perl, Python, etc. What else have you tried?

ADD REPLY
0
Entering edit mode
8.1 years ago

If you want to write a header, you could use a variety of tools, such as awk, echo and others.

For example, to add the tab-delimited header A \t B \t C to foo.txt:

$ awk 'BEGIN{print "A\tB\tC"} {print $0;}' foo.txt > foo-with-header.txt

Or via echo:

$ echo -e "A\tB\tC" | cat - foo.txt > foo-with-header.txt

Lots of ways to do this.

ADD COMMENT

Login before adding your answer.

Traffic: 2497 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