CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
perl parser by condition/text

 



cmccabe1
Novice

Mar 18, 2015, 11:33 AM

Post #1 of 1 (3972 views)
perl parser by condition/text Can't Post

There is a diagram, some steps that explain the diagram, the parse rules, and a bash menu attached. Step 4 (parse by condition) is what I am struggling with and can not find a solution as of yet. I am trying to use perl to parse a file based on the format or text in that file, if the file has a ">" in it then SNP parser, but if file has a "del" in it then deletion parser. I am not a programmer by trade, but I am learning slowly. Thank you for any help :).


Code
menu +> gjb2 -> -> -> -> gjb2name -> -> position -> -> parse -> add2text -> end program          
| | ^ ^ ^ ^ ^ ^
| | | | | | | |
| input variant/id python python parse | +--Y/N select---+
| add NM_ ${id}_name ${id}_position input | menu | exit
| merge input | |
| add 2 text | |
| | | |
| | | |
| | | |
|-------+<-------------------------------------------------------<+----------

1. user inputs id and variant, the specific NM_ is added, the two inputs are combined, and the input is added to list
2. python script to verify name and create ${id}_name.txt and save it in specific directory (C:/Users/cmccabe/Desktop/annovar/${id}_name.txt)
3. python script to convert and create ${id}_position.txt and save it in specific directory (C:/Users/cmccabe/Desktop/annovar/${id}_position.txt)
4. conditional parse based on saved input in (C:/Users/cmccabe/Desktop/annovar/${id}_position.txt)
5. function that adds input to a list file used in a later command
6. user asked if there is more to do (If "Y" then return to menu, if "N" then Goodbye message and exit program)

Attachments: bash.sh (2.10 KB)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives