Skip to content

Instantly share code, notes, and snippets.

View piroyon's full-sized avatar
🎼

Hiroyo NISHIDE piroyon

🎼
View GitHub Profile
@piroyon
piroyon / entityURI?
Last active December 19, 2015 00:09
Write to your Triple Store URL(line 20). Change file name to a part of URI. Put it on +execCGI directory. ex: http://mbgd.genome.ad.jp/rdf/gene/eco:B0002 "gene" is this script file!
#!/usr/bin/perl
use URI::Escape;
use WWW::Curl::Easy;
use CGI;
$q = CGI->new();
$url = $q->url;
$curl = WWW::Curl::Easy->new();
@piroyon
piroyon / gist:6711282
Last active December 23, 2015 23:39
Submit job with count limited
#!/usr/bin/perl
$max_qsub = 100;
$max_cmd = 1000;
@cmd_array = ();
@count = ();
$cmd_num = 0;
for($i=0; $i<$max_cmd; $i++) {
$cmd = "any_command" . $i;
@piroyon
piroyon / get DOI from text
Last active September 7, 2018 02:17
get DOI from text list using crossref API
#!/usr/bin/perl
=head1 SCRIPT NAME
getDOI.pl
=head1 DESCRIPTION
Get DOI from text list using crossref API.
@piroyon
piroyon / sge2pbs.pl
Last active June 11, 2018 06:52
Rewrite SGE script to PBS script
#!/usr/bin/perl
=head1 SCRIPT NAME
sge2pbs.pl
=head1 DESCRIPTION
Rewrite SGE script to PBS script
=head1 USAGE
perl sge2pbs.pl sge_sh_script_file > pbs_sh_script_file
=cut
@piroyon
piroyon / diamond2b2g.pl
Last active April 21, 2020 06:49
Format the result of diamond (vs.nr) xml file for blast2go
#!/usr/bin/perl
=head1 SCRIPT NAME
diamond2b2g.pl
=head1 DESCRIPTION
Format the result of diamond (vs.nr) xml file for blast2go
@piroyon
piroyon / getPaper_fromDOI.pl
Last active April 15, 2019 02:38
get the details of the paper from DOI list
#!/usr/bin/perl
=head1 SCRIPT NAME
getPaper_fromDOI.pl
=head1 DESCRIPTION
Get the details of the paper from DOI using crossref API.
@piroyon
piroyon / d3_table_svg.html
Last active July 16, 2019 01:46
D3 put svg on table
<!DOCTYPE html>
<meta charset="utf-8">
<meta http-equiv="Refresh" content="60">
<script src="http://d3js.org/d3.v3.min.js"></script>
<div id="vis"></div>
<script>
var url = 'http://aaa.bbb.ccc/cgi-bin/getstatus.pl';
@piroyon
piroyon / rss_slackpost.php
Last active April 17, 2020 04:21
Check RSS feed and post to slack, if there is a new article
<?php
// Usage: /usr/bin/php rss_slackpost.php
// Require: php-xmlrpc, php-cli
// Make slack app. and get slackapikey, then invite bot
// $ cat feedlog.txt --> The URL of the newest article in the last check
// https://example.org/wp/archives/178
ini_set("auto_detect_line_endings", true);
@piroyon
piroyon / getTPM.pl
Last active December 21, 2022 01:40
Get FPKM and TPM from a result gtf file of stringtie
#!/usr/bin/env perl
use strict;
use warnings;
use Getopt::Std;
use Pod::Usage;
pod2usage() unless @ARGV;
=pod
@piroyon
piroyon / ortholog_table.py3
Last active October 13, 2021 23:52
make_ortholog_dict
f = open('201110_allseq_colors.tsv', 'r')
orth_dict = {} ##初期化
color_dict = {}
for linen in f:
line = linen.rstrip() ##改行の削除
values = line.split("\t")
ortholog_id = values[0]
orth_dict.setdefault(ortholog_id, {}) ##1段目の辞書初期化