Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Erlang!! boing!

  • Loading branch information...
commit 7ad2dac8554364c172754881b3e41cc81d1b3c7d 1 parent 03e229a
Jay Hannah authored
View
30 Bio_AlignIO_bug/README
@@ -1,3 +1,33 @@
+
+14:28 < balin> deafferret, I only posted about add_seq to bioperl-l. Should I
+ start a new thread for write_aln or can I reuse this one?
+14:28 <@deafferret> If it's a seperate issue I'd post a separate email
+14:29 <@deafferret> ticket 2793 is definately add_seq only
+14:29 < balin> I thought so too
+ --irc.freenode.net #bioperl 20090319
+
+http://bugzilla.open-bio.org/show_bug.cgi?id=2793
+oh... maybe I can patch it before they do
+ --jhannah 20090320
+
+7 email discussion:
+http://thread.gmane.org/gmane.comp.lang.perl.bio.general/18973/focus=18980
+ --jhannah 20090320
+
+12:26 < balin> deafferret, I found that add_seq function does not insert a new sequence into alignment, but replaces the old sequence. So this statement
+ seems to work:
+12:27 < balin> $aln->get_seq_by_pos($i)->display_id("new header");
+12:27 < balin> $aln->add_seq($aln->get_seq_by_pos($i),$i-1);
+12:29 <@deafferret> ahh... congrats. :)
+12:30 < balin> still, this looks awkward
+12:38 < balin> It turns out I need $i-1 here because get_seq_by_pos counts from 1 and add_seq counts from 0. Would that be considered a bug?
+13:01 <@deafferret> hmm... maybe a bug that can't be fixed because no one wants to break backwards-compatibility ... so a FEATURE? :)
+13:01 <@deafferret> you should probably post that to bioperl-l and ask the long white beards
+13:37 < balin> yes, I'll probably do that
+13:37 < balin> white beards, haha
+13:46 <@deafferret> :)
+ --irc.freenode.net #bioperl 20090319
+
Possible bug report from #bioperl balin
http://pastebin.com/m182fca5d
--jhannah 20090318
View
7 Bio_AlignIO_bug/demo.pl
@@ -7,7 +7,12 @@
my $aln = Bio::SimpleAlign->new();
my $seq = Bio::LocatableSeq->new(-id => 'testseq', -seq => 'CATGTAGATAG');
-$aln->add_seq($seq);
+$aln->add_seq($seq, 1);
+
+print $aln->get_seq_by_pos(1)->seq;
+exit;
+
+display_id("1");
$aln->get_seq_by_pos(1)->display_id("1");
my $outAln = Bio::AlignIO->new("-file" => ">test.fasta", "-format" => "fasta");
$outAln->write_aln($aln);
View
31 erlang/tut17.erl
@@ -0,0 +1,31 @@
+-module(tut17).
+-export([start_ping/1, start_pong/0, ping/2, pong/0]).
+
+ping(0, Pong_Node) ->
+ {pong, Pong_Node} ! finished,
+ io:format("ping finished~n", []);
+
+ping(N, Pong_Node) ->
+ {pong, Pong_Node} ! {ping, self()},
+ receive
+ pong ->
+ io:format("Ping received pong~n", [])
+ end,
+ ping(N - 1, Pong_Node).
+
+pong() ->
+ receive
+ finished ->
+ io:format("Pong finished~n", []);
+ {ping, Ping_PID} ->
+ io:format("Pong received ping~n", []),
+ Ping_PID ! pong,
+ pong()
+ end.
+
+start_pong() ->
+ register(pong, spawn(tut17, pong, [])).
+
+start_ping(Pong_Node) ->
+ spawn(tut17, ping, [3, Pong_Node]).
+
Please sign in to comment.
Something went wrong with that request. Please try again.