SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert BED format to SAM/BAM? seq_newbie Bioinformatics 1 06-23-2011 09:11 AM
Looking process to convert gff3 format into ace format or sam format andylai Bioinformatics 1 05-17-2011 03:09 AM
how to convert from bam or sam to map rcorbett Bioinformatics 1 11-04-2010 11:49 AM
convert BAM -> SAM? thinkRNA Bioinformatics 4 06-30-2010 04:08 AM
Convert MAQ,SOAP alignment result to ACE format baohua100 Bioinformatics 0 03-02-2009 02:01 AM

Reply
 
Thread Tools
Old 01-17-2011, 10:28 PM   #1
KevinLam
Senior Member
 
Location: SEA

Join Date: Nov 2009
Posts: 197
Default SOAP alignment format convert to SAM/BAM

Dear All,
would you know if there's a convertor for SOAP alignment format to SAM?
KevinLam is offline   Reply With Quote
Old 01-18-2011, 04:08 AM   #2
gaffa
Member
 
Location: Gothenburg/Uppsala, Sweden

Join Date: Oct 2010
Posts: 82
Default

There is a script called "soap2sam.pl" - find it here: http://soap.genomics.org.cn/soapaligner.html
gaffa is offline   Reply With Quote
Old 01-23-2012, 01:44 AM   #3
Aman Mahajan
Member
 
Location: India

Join Date: Jan 2012
Posts: 22
Default

I assembled my illumina data using SOAP, now I want to carry out expression analysis using Rseq tool. it accepts only SAM format so I downloaded SAMTOOLS to convert my soap output to SAM. Can anyone tell me how to run it and convert, tutorial has been of no use yet!

or if you can throw light on how to use this script.
Aman Mahajan is offline   Reply With Quote
Old 01-23-2012, 01:51 AM   #4
gringer
David Eccles (gringer)
 
Location: Wellington, New Zealand

Join Date: May 2011
Posts: 801
Default

From the source code from that script:

Code:
Usage: soap2sam.pl [-p] <aln.soap>
This will output a SAM format file on standard output. If you want that output to be sent to a particular file, then put a redirection sequence ('> aln_file.sam') at the end of the command line.

It looks like the '-p' option is used to indicate that your alignments are paired-end.
gringer is offline   Reply With Quote
Old 01-23-2012, 02:07 AM   #5
Aman Mahajan
Member
 
Location: India

Join Date: Jan 2012
Posts: 22
Post

Thanks. but I actually want to know how can I input my file to run through this.
Aman Mahajan is offline   Reply With Quote
Old 01-23-2012, 02:13 AM   #6
gringer
David Eccles (gringer)
 
Location: Wellington, New Zealand

Join Date: May 2011
Posts: 801
Default

Have you aligned your reads using SOAPaligner? That program produces output that can be fed into soap2sam as the 'aln.soap' command-line argument.
gringer is offline   Reply With Quote
Old 01-23-2012, 03:26 AM   #7
Aman Mahajan
Member
 
Location: India

Join Date: Jan 2012
Posts: 22
Default

My alignment output has generated a lot of files.. which file out of these has to be the input for soap2sam.pl.. Should the .contig file be renamed as .soap for input?
Aman Mahajan is offline   Reply With Quote
Old 01-23-2012, 04:23 AM   #8
ganygan25
Junior Member
 
Location: UK

Join Date: Dec 2011
Posts: 9
Default

While running soap, the output file name can be explicitly specified.
soap -D <Reference Genome Index> <Read Files> -o <Output File>
(Note:- no file extension required)

This output File can then be converted to SAM format as:-
soap2sam.pl -p <Output File> > <Sam File>.sam
ganygan25 is offline   Reply With Quote
Old 01-23-2012, 08:33 PM   #9
Aman Mahajan
Member
 
Location: India

Join Date: Jan 2012
Posts: 22
Default

@ganygany - my output file name is abc.soap.

now I am putting this command

soap2sam.pl abc.soap abc.sam

It generates a sam file but it gives an error message.
Aman Mahajan is offline   Reply With Quote
Old 01-24-2012, 12:47 AM   #10
gringer
David Eccles (gringer)
 
Location: Wellington, New Zealand

Join Date: May 2011
Posts: 801
Default

you missed out the > symbol
gringer is offline   Reply With Quote
Old 01-24-2012, 01:07 AM   #11
Aman Mahajan
Member
 
Location: India

Join Date: Jan 2012
Posts: 22
Default

I have put this symbol now

soap2sam.pl abc.soap > abc.sam..

Error of command not found. If i put this command :-

perl soap2sam.pl abc.soap > abc.sam..

Still the same result, file generated of the name abc.soap but zero space..
Aman Mahajan is offline   Reply With Quote
Old 01-24-2012, 01:24 AM   #12
ganygan25
Junior Member
 
Location: UK

Join Date: Dec 2011
Posts: 9
Default

"Error of command not found. "
Not a soap issue. Could your verify your installation and run them again?
Or post your sequence of commands here..

"file generated of the name abc.soap but zero space"
If your commands are fine, do you mean to say that there are no reads aligned ??
ganygan25 is offline   Reply With Quote
Old 01-24-2012, 01:29 AM   #13
Aman Mahajan
Member
 
Location: India

Join Date: Jan 2012
Posts: 22
Default

Okay. I aligned my data using SOAP so I have a file abc.soap which is aligned.

I have copied this file in the same folder with soap2sam.pl. Now I am trying to run soap2sam.pl on this file abc.soap.

My command is not showing any error but the output generated i.e abc.sam is of zero space.

Any idea if there is a need to compile soap2sam.pl first because I am using it through samtools.

Thank you.
Aman Mahajan is offline   Reply With Quote
Old 01-24-2012, 01:35 AM   #14
gringer
David Eccles (gringer)
 
Location: Wellington, New Zealand

Join Date: May 2011
Posts: 801
Default

could you please show the result of running the following command (including the exact error, if any)? I suspect that soap2sam isn't in the directory that you're trying to run it from.

Code:
ls $(pwd)/soap2sam.pl $(pwd)/abc.soap
gringer is offline   Reply With Quote
Old 01-24-2012, 01:41 AM   #15
Aman Mahajan
Member
 
Location: India

Join Date: Jan 2012
Posts: 22
Default

result is


/root/Desktop/samtools-0.1.18/misc/soap2sam.pl


in the same folder i have my file abc.soap
Aman Mahajan is offline   Reply With Quote
Old 01-24-2012, 01:46 AM   #16
gringer
David Eccles (gringer)
 
Location: Wellington, New Zealand

Join Date: May 2011
Posts: 801
Default

Okay, but you shouldn't really be running that as root. Anyway, another command to try:
Code:
pwd && perl ./soap2sam.pl
If that works (and shows the help/usage message), then this one should also work:
Code:
perl ./soap2sam.pl abc.soap > abc.sam
gringer is offline   Reply With Quote
Old 01-24-2012, 01:56 AM   #17
gringer
David Eccles (gringer)
 
Location: Wellington, New Zealand

Join Date: May 2011
Posts: 801
Default

no such file or directory for what? could you please copy the exact error?
gringer is offline   Reply With Quote
Old 01-24-2012, 01:57 AM   #18
Aman Mahajan
Member
 
Location: India

Join Date: Jan 2012
Posts: 22
Default

Sorry I typed the wrong file name. corrected it and ran it..the command runs and generates an output but same zero space it has..
Aman Mahajan is offline   Reply With Quote
Old 01-24-2012, 02:02 AM   #19
Aman Mahajan
Member
 
Location: India

Join Date: Jan 2012
Posts: 22
Default

I mean I typed it as ab.soap by mistake. Corrected it and ran again. but the output file is again empty.
Aman Mahajan is offline   Reply With Quote
Old 01-24-2012, 02:02 AM   #20
gringer
David Eccles (gringer)
 
Location: Wellington, New Zealand

Join Date: May 2011
Posts: 801
Default

Have you checked the input file to see if it looks right?
Code:
head abc.soap
gringer is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 04:11 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO