convert sam format to axt Format
1
0
Entering edit mode
8.9 years ago
midox ▴ 290

hello,
I would like to convert my sam file (.sam) to another type is .axt format.
i used BWA for alignement but the output of this tool is .sam format.
Can you help me?
Thanks

alignment sam axtformat • 3.8k views
ADD COMMENT
0
Entering edit mode

does AXT supports INDELS (like SAM)?

ADD REPLY
0
Entering edit mode

yes. it support indels

ADD REPLY
0
Entering edit mode

so, how does it look likes with indels, I cannot find an example

ADD REPLY
0
Entering edit mode

this is an example:

14 NODE_98_length_11049_ID_45456 4251 4311 Read_10 8190 8248 - 3854
aaatgtattccgataggccattttacatttggagggacggttgaaag---tggacagaggaaaa
aaatgtattccgatagg----tttacatttggagg-acggttgaaagacttggacagaggaaaa

so how convert .sam output to .axt?

ADD REPLY
0
Entering edit mode

i cant install ant in my server!!! have you solution?

ADD REPLY
0
Entering edit mode

you don't need to be root to install ant, just download and put it anywhere: https://ant.apache.org/bindownload.cgi

ADD REPLY
0
Entering edit mode

I installed apache.

but no run to biostar170742.

[mk@rainman jvarkit]$ /home/mk/apache-ant-1.9.6/bin/ant -version
Apache Ant version 1.7.1 compiled on August 24 2010
[mk@rainman jvarkit]$ make biostar170742
echo "Compiling htsjdk with ${JAVA_HOME} = "
Compiling htsjdk with  =
echo "Compiling htsjdk library for java. Requires  apache ANT. If it fails here, it's a not a problem with jvarkit."
Compiling htsjdk library for java. Requires  apache ANT. If it fails here, it's a not a problem with jvarkit.
echo "And ${JAVA_HOME}/bin/javac should be >=1.8"
And /bin/javac should be >=1.8
(cd /home/mk/jvarkit/htsjdk-2.0.1 && ant )
Buildfile: build.xml

write-version-property:

BUILD FAILED
/home/mk/jvarkit/htsjdk-2.0.1/build.xml:64: Problem: failed to create task or type propertyfile
Cause: the class org.apache.tools.ant.taskdefs.optional.PropertyFile was not found.
        This looks like one of Ant's optional components.
Action: Check that the appropriate optional JAR exists in
        -/usr/share/ant/lib
        -/home/mk/.ant/lib
        -a directory added on the command line with the -lib argument

Do not panic, this is a common problem.
The commonest cause is a missing JAR.

This is not a bug; it is a configuration problem

Total time: 0 seconds
make: *** [/home/mk/jvarkit/htsjdk-2.0.1/dist/htsjdk-2.0.1.jar] Erreur 1
[mk@rainman jvarkit]$
ADD REPLY
0
Entering edit mode

thank you but I cant install apache. I don't know the problem

have you another solution to run samtoaxt.java?

Thanks

ADD REPLY
2
Entering edit mode
8.9 years ago

I quickly wrote a converter https://github.com/lindenb/jvarkit/wiki/Biostar170742

$ java -jar dist-2.0.1/biostar170742.jar \
    -R ref.fa \
    S1.bam

0 rotavirus 1 70 rotavirus_1_317_5:0:0_7:0:0_2de/1 + 60
GGCTTTTAATGCTTTTCAGTGGTTGCTGCTCAAGATGGAGTCTACTCAGCAGATGGTAAGCTCTATTATT
GGCTTTTAATGCTTTTCAGTGGTTGCTGCTCAATATGGCGTCAACTCAGCAGATGGTCAGCTCTAATATT

1 rotavirus 1 70 rotavirus_1_535_4:0:0_4:0:0_1a6/2 + 60
GGCTTTTAATGCTTTTCAGTGGTTGCTGCTCAAGATGGAGTCTACTCAGCAGATGGTAAGCTCTATTATT
GGCTTTTACTGCTTTTCAGTGGTTGCTTCTCAAGATGGAGTGTACTCATCAGATGGTAAGCTCTATTATT

2 rotavirus 1 70 rotavirus_1_543_5:0:0_11:0:0_390/2 + 60
GGCTTTTAATGCTTTTCAGTGGTTGCTGCTCAAGATGGAGTCTACTCAGCAGATGGTAAGCTCTATTATT
GGCTTTTAATGCTTTTCATTTGATGCTGCTCAAGATGGAGTCTACACAGCAGATGGTCAGCTCTATTATT

3 rotavirus 1 70 rotavirus_1_578_3:0:0_7:0:0_7c/1 + 60
GGCTTTTAATGCTTTTCAGTGGTTGCTGCTCAAGATGGAGTCTACTCAGCAGATGGTAAGCTCTATTATT
GGCTTTTAATGCTTTTCAGTGGTTGCTGCTCAAGATGGAGTCTCCTGAGCAGCTGGTAAGCTCTATTATT
(...)
ADD COMMENT
0
Entering edit mode

thank you pierre but I can't run this code.

I must install jvarkit?

ADD REPLY
0
Entering edit mode

I installed the tool. but I can't run Biostar70742.java

there are errors.

[m@rainman biostar]$ javac Biostar170742.java

ADD REPLY
0
Entering edit mode

you didn't follow the instructions: https://github.com/lindenb/jvarkit/wiki/Biostar170742

make biostar170742
ADD REPLY
0
Entering edit mode

same problem BUILD Failed.

[mk@rainman jvarkit]$ make biostar170742
echo "Compiling htsjdk with ${JAVA_HOME} = "
Compiling htsjdk with  =
echo "Compiling htsjdk library for java. Requires  apache ANT. If it fails here, it's a not a problem with jvarkit."
Compiling htsjdk library for java. Requires  apache ANT. If it fails here, it's a not a problem with jvarkit.
echo "And ${JAVA_HOME}/bin/javac should be >=1.8"
And /bin/javac should be >=1.8
(cd /home/mk/jvarkit/htsjdk-2.0.1 && ant )
Buildfile: build.xml

write-version-property:

BUILD FAILED
/home/mk/jvarkit/htsjdk-2.0.1/build.xml:64: Problem: failed to create task or type propertyfile
Cause: the class org.apache.tools.ant.taskdefs.optional.PropertyFile was not found.
        This looks like one of Ant's optional components.
Action: Check that the appropriate optional JAR exists in
        -/usr/share/ant/lib
        -/home/mk/.ant/lib
        -a directory added on the command line with the -lib argument

Do not panic, this is a common problem.
The commonest cause is a missing JAR.

This is not a bug; it is a configuration problem

Total time: 0 seconds
make: *** [/home/mk/jvarkit/htsjdk-2.0.1/dist/htsjdk-2.0.1.jar] Erreur 1
[mk@rainman jvarkit]$
ADD REPLY
0
Entering edit mode

as it is described "ant-optional" is missing...

try googling please.

ADD REPLY
0
Entering edit mode

forgot to put the read positions: udpated the source https://github.com/lindenb/jvarkit/commit/84dfac8015be3ae66cdb15b25618022198b8f106

ADD REPLY

Login before adding your answer.

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