How to convert .bed file to .juncs file using Tophat?
1
0
Entering edit mode
8.1 years ago

Hi all,

I am trying to convert the junctions.bed file to a new_list.juncs file in Tophat.

In my Linux server, I tried inputting bed_to_juncs junctions.bed new_list.juncs but command not found. When I try to run it as a Tophat command as this tophat bed_to_juncs junctions.bed new_list.juncs it's not correct as it is now a mapping command.

Can someone guide me how to do it correctly?

Thanks!

RNA-Seq Tophat • 2.1k views
ADD COMMENT
0
Entering edit mode

Can you perhaps post here the command that doesn't work? Is bed_to_juncs in your $PATH?

ADD REPLY
0
Entering edit mode

The command is

bed_to_juncs junctions.bed new_list.juncs

I'm sorry, but I'm quite new to Linux so could you show me how to check if bed_to_juncs is in $PATH?

ADD REPLY
3
Entering edit mode
8.1 years ago

The $PATH variable is an environmental variable of Linux that contains several paths that you'd like to have ready everywhere you are with your command line (this is probably the worst definition of $PATH ever but I think it helps you getting the point since you're new to Linux).

If you echo $PATH you will see it.

If you are inside the directory where bed_to_juncs is, and the bed_to_juncs file is executable, then if you type bed_to_juncs and press Enter the command will run. To see if it is executable just do:

ls -l /your/path/to/bed_to_juncs

and you will see something like:

-rwxr-xr-x 1 root root 1925 Feb 23  2016 /software/tophat/tophat-2.1.0/bin/bed_to_juncs

If you subdivide the first part, you get groups of 3: rwx | r-x | r-x . The first group refers to the user, which is you, the second to the usergroup, which is sometimes just you but in some systems is a group of users, and the third group refers to all. r refers to read, w is write, x is execute. There must be an x in the first group for you to execute that file.

Coming back to what the $PATH is, if your tophat directory is not in the $PATH, you won't be able to call bed_to_juncs from everywhere in your system, but only from the actual bed_to_juncs directory.

To add the path of your bed_to_juncs to the $PATH:

export PATH=$PATH:/your/path/to/bed_to_juncs

Substitute /your/path/to/bed_to_juncs with your actual one. This should do the trick, if the problem is this one! If you don't have rwx in your bed_to_juncs file specifications (as discussed above), just run:

chmod u+rwx /your/path/to/bed_to_juncs

This gives read-write-execute permissions to the user, which is you.

ADD COMMENT
1
Entering edit mode

Thanks a lot! Manage to execute it with your suggestions!

ADD REPLY
0
Entering edit mode

If you bookmark my answer it will be clear for others that read this that it worked :) glad to have helped!

ADD REPLY

Login before adding your answer.

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