[EMBOSS] Seqret stdin issues

Ronnie O ronnieoc at gmail.com
Sat Sep 24 23:44:50 UTC 2005


Hi Peter,
First, thanks for your reply and sorry for my delay.  I went with your
suggestion of running seqret with the -debug flag set in hopes of
finding something and heres what I came up with.

First, I first ran seqret from the command line with the following command:

./seqret raw::testdna raw::stdout -filter -debug

I created a file, "testdna", that simply held nucleotide characters in
raw format.  Execution was successful, as the sequence was output to
the terminal window, and the seqret.dbg file was created in the emboss
folder.

Second, I ran my cocoa application which calls seqret with basically
the same sequence of flags with the exception of "stdin" for
"testdna":

seqret raw::stdin raw::stdout -filter -debug

My application is not receiving data from seqret as of this point.
The seqret.dbg file was created in the build folder of my application.

To decipher seqret's role in this fiasco, i analyzed the seqret.dbg
files created in both instances.  I can't say I am at all familiar
with how to analyze them, but I took a quick look at both.  Knowing my
command line running of the program worked fine, I wanted to compare
the debug files to see where seqret could be thrown off with my cocoa
app call.  Both files appear to have been logged to completion and I
didn't notice any major differences between the two offhand.  To make
it easier, I ran a diff on the two files and below is the output of
this (This will format poorly, i'm sure):

++seqUsaProcess 'raw::testdna' 0..0(N) '' 0                   |
++seqUsaProcess 'raw::stdin' 0..0(N) '' 0
USA to test: 'raw::testdna'                                   | USA to
test: 'raw::stdin'
unknown dbname testdna, try filename                          |
unknown dbname stdin, try filename
found filename testdna                                        | found
filename stdin
ajSeqAccessFile testdna                                       |
ajSeqAccessFile stdin
ajFileNewIn 'testdna'                                         |
ajFileNewIn 'stdin'
ajFileBuffNobuff testdna buffsize: 0                          |
ajFileBuffNobuff stdin buffsize: 0
++seqReadFmt format 42 (raw) 'raw::testdna' feat No           |
++seqReadFmt format 42 (raw) 'raw::stdin' feat No
read 'taccgcgcgtatccgtcgagcacacgtgtgccacacagcatcggtggccaatatt |
Appending missing newline to 'aaaaaaaaa'
                                                              > read 'aaaaaaaaa
EOF ajFileGetsL file testdna                                  | EOF
ajFileGetsL file stdin
ajFileNext for non-list file testdna                          |
ajFileNext for non-list file stdin
ajFileBuffClear 'testdna' (0 lines)                           |
ajFileBuffClear 'stdin' (0 lines)
ajSeqSetRange (len: 143 0..0 old 0..0) rev:No reversed:No     |
ajSeqSetRange (len: 9 0..0 old 0..0) rev:No reversed:No
      result: (len: 143 0..0)                                 |      
result: (len: 9 0..0)
ajSeqAllWrite '' len: 143                                     |
ajSeqAllWrite '' len: 9
seqAllClone 0 .. 0 1 .. 143 len: 143 type: 'N'                |
seqAllClone 0 .. 0 1 .. 9 len: 9 type: 'N'
seqSeqFormat numwidth old: 4 new: 4                           |
seqSeqFormat numwidth old: 2 new: 2
ajSeqRead: input file 'testdna' still there, try again        |
ajSeqRead: input file 'stdin' still there, try again
ajFileBuffNobuff testdna buffsize: 0                          |
ajFileBuffNobuff stdin buffsize: 0
++seqReadFmt format 42 (raw) 'raw::testdna' feat No           |
++seqReadFmt format 42 (raw) 'raw::stdin' feat No
at EOF: File already read to end testdna                      | at
EOF: File already read to end stdin
ajFileNext for non-list file testdna                          |
ajFileNext for non-list file stdin
ajFileBuffClear 'testdna' (0 lines)                           |
ajFileBuffClear 'stdin' (0 lines)
ajFileBuffEmpty Size: 0 Pos: 0 End: Y Handle: 3 Fp: a000dd44  |
ajFileBuffEmpty Size: 0 Pos: 0 End: Y Handle: 3 Fp: a0001bc8
seqRead: *failed* to read sequence raw::testdna using format  |
seqRead: *failed* to read sequence raw::stdin using format ra
ajSeqRead: open buffer  usa: 'raw::testdna' returns: No       |
ajSeqRead: open buffer  usa: 'raw::stdin' returns: No
ajFileBuffClear 'testdna' (-1 lines)                          |
ajFileBuffClear 'stdin' (-1 lines)
closing file 'testdna'                                        |
closing file 'stdin'
String usage (bytes): 12916 allocated, 9616 freed, 3300 in us | String
usage (bytes): 12120 allocated, 9374 freed, 2746 in us
String usage (number): 715 allocated, 326 freed 389 in use    | String
usage (number): 717 allocated, 328 freed 389 in use
Memory usage (bytes): 42591 allocated, 128 reallocated 22004  | Memory
usage (bytes): 41827 allocated, 128 reallocated 22036
Memory usage (number): 1903 allocates, 929 frees, 2 resizes,  | Memory
usage (number): 1907 allocates, 933 frees, 2 resizes,

If this pasted output from diff is illegible, let me know how to
better send it and I will resend.  Or if the full dbg files would be
more helpful, I can send them too.

The only differences in the log files appear to be on lines where
"testdna" is printed to the log vs "stdin" being printed.  It can be
seen that my sequence data is being received in both cases.  And the
only other differences are in length prints and the string and memory
usage statistics.  So my guess is that seqret is running just fine.

My hypothesis is that I am not grabbing the output correctly in my
cocoa app and I need to reformat my code on that end.  Or is it
possible that my output is somehow not being pushed to stdout (which i
doubt)?  If you could look at the differences in the debug files and
assure me that in both cases that seqret is running correctly and
throwing the output to stdout, then I can at least narrow my problem
down to not grabbing stdout correctly.  Also, if you would like the
entire debug file from either, just let me know.  Thanks again all!
...........
Ronnie




More information about the EMBOSS mailing list