Page 1 of 1

PLS an urgent SOS!

Posted: Mon May 14, 2007 4:30 pm
by Mei_mei
Hi! .... I need some urgent help abt a school project .... i need to make a PHP script for a DNA code .... in fact it's a chain of amino bases which is cutted by an enzyme at a specific place ... if anyone is feeling like helping me pls let me know i''ll be verry gratefull .... ! 10x ....


P.S. it;s not a diffucult task to do ... i mean the script and it's not specific but I'm just new to PHP and i have no idea how to do it ... it's up to that script my whole exam ... :( pls

Posted: Mon May 14, 2007 4:31 pm
by John Cartwright
Moved to Volunteer-Work

AOL Speak

Posted: Tue May 15, 2007 5:05 pm
by feyd
mmm AOL speak.
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.

Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.
This was mistakenly posted as a new post elsewhere...
Mei_mei wrote:how to cut a chain of characters at a specific place and add what;s rest like sufix and prefix ?


Exemple : AAAAAGGTTTTCTCTCTCTAAGGTTAAAAAAAAAAAAAAAAAAAAAAAAAA

I want to cut it in AAG and exactly after the first A so then i want to add the A like sufix to the first chain and AG like a prefix to the second one :

AAAAAcut here AGGTTTTCTCTCTCTAcut hereAGGTTAAAAAAAAAAAAAAAAAAAAAAAAAA

first chain: AAAAA +A
second chain:AG+GTTTTCTCTCTCTA
third:A+AGGTTAAAAAAAAAAAAAAAAAAAAAAAAAA

P.S no suffix to the last chain and no prefix for the firs one
may be a combination substr etc and a for but i just don't know .... sos !? :(

Re: PLS an urgent SOS!

Posted: Wed May 16, 2007 3:23 am
by CoderGoblin
Mei_mei wrote: it's up to that script my whole exam
Does that mean you need this for an exam... If so you are not earning anything by us supplying an answer. We will assist you however if you need help.

To start with here are a few things which may be of use...
To get a string from a certain point use stristr
To get the length of a string use strlen
To convert a string to an array you can use ( strlen
To use a loop and add to an array you need to use str-split
Finally to extract 1 character you can use substr

Using this information it is fairly easy to do what you want. If you produce some code and have problems, post your code and I am sure we will help more.

Posted: Fri May 18, 2007 5:15 pm
by Mei_mei
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Code: Select all

<?

$seq=$_POST['sequence'];
$enz=$_POST['enzyme'];
$pos=$_POST['position'];
$coup=$_POST['position_1'];


$sit=$post.$coup
$adn=explode ($sit , $seq);


$b = implode ("///" , $adn);
echo $b , "<br>" ;


?>
i manage it til that stade ... and then i can't find the way to add the suffix and preefix ... 8O


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

RESOLVED ...

Posted: Fri May 25, 2007 7:46 am
by Mei_mei
ok i did that ... thanks anyway .... now i just need someone to explain me the principe of a script that i want to use as a guide ... it's not too long so if anyone have a little time ... thanks
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.

Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.
Onion: It's not '10x', it's 'thanks'. That's your second warning. If you persist with this form of writing I'll lock this thread.