Biostar Beta. Not for public use.
How to sort sam file using shell script?
0
Entering edit mode
15 months ago

How can I sort sam files just using shell script, without using samtools? I'd like to sort by the chromosome + position number thx!

ADD COMMENTlink
3
Entering edit mode

you don't and you use samtools.

ADD REPLYlink
0
Entering edit mode
ADD REPLYlink
0
Entering edit mode

Why not use samtools? Is this homework?

ADD REPLYlink
0
Entering edit mode

definitely I know it's better to use samtools. but we are running on AWS EC2, and it seems the machine lacks of some library. so we would like to compress just by shell

ADD REPLYlink
1
Entering edit mode

it seems the machine lacks of some library.

so it's a xy problem

ADD REPLYlink
0
Entering edit mode

and it seems the machine lacks of some library.

If you would be a bit more specific here then maybe we can help.

ADD REPLYlink
0
Entering edit mode

thx a lot. the error is: error while loading shared libraries: libncursesw.so.6: cannot open shared object file: No such file or directory.....i don't know how to figure this out..

ADD REPLYlink
0
Entering edit mode

it's a problem with your environment variable LD_LIBRARY_PATH

find where is the file 'libncursesw.so' and then add the path to its directory to LD_LIBRARY_PATH

ADD REPLYlink
0
Entering edit mode

thx. I tried "export LD_LIBRARY_PATH=/lib64/:$LD_LIBRARY_PATH", but it still not working.....

ADD REPLYlink
0
Entering edit mode
export LD_LIBRARY_PATH=/lib64:${LD_LIBRARY_PATH}

and what is the output of

ls /lib64/libncursesw.*
ADD REPLYlink
0
Entering edit mode

Actually it's libncursesw.so.5 I keep trying lower version of samtools, but it keeps asking for libncursesw.so.6. Why can't even lower version samtools libncursesw.so.5?

ADD REPLYlink
0
Entering edit mode

I tried "export LD_LIBRARY_PATH=/lib64:${LD_LIBRARY_PATH}", still not work, it keeps asking for libncursesw.so.6

ADD REPLYlink
0
Entering edit mode

Depending on your OS:

sudo apt-get install libncurses5-dev libncursesw5-dev

...or:

sudo yum install ncurses-devel
ADD REPLYlink
0
Entering edit mode

did you compile samtools on the AWS side ? if true, there must be this library somewhere. Otherwise, try to recompile a samtools from sources on AWS.

ADD REPLYlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.3