Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- if( !(isset($args['ref']))) return "<span style='color:red;'>@reference missing</span>";
- if( !(isset($args['start']))) return "<span style='color:red;'>@start missing</span>";
- if( !(isset($args['end']))) return "<span style='color:red;'>@end missing</span>";
- $ref=trim($args['ref']);
- if(strlen($ref)==0) return "<span style='color:red;'>bad @reference</span>";
- $start=(int)trim(str_replace(',','',$args['start']));
- $end=(int)trim(str_replace(',','',$args['end']));
- if(!is_int($start)) return "<span style='color:red;'>bad @start</span>";
- if(!is_int($end)) return "<span style='color:red;'>bad @end</span>";
- $url="http://www.myip.com/cgi-bin/gbrowse/buildname/?name=".
- $ref."%3A".$start."..".$end;
- $html= "<div style='text-align:center;margin:10pt;'>".
- "<a href='".$url."' target='_blank'>".$chrom.":".$start."-".$end."</a><br/>".
- "<iframe height='".(isset($args['height'])?$args['height']:"500px")."' width='90%' src ='".$url."' />".
- "</iframe></div>"
- ;
- return $html;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement