This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ensrw@mysql-eg-prod-2.ebi.ac.uk:4239 (triticum_aestivum_variation_31_84_2) | |
> SELECT * FROM variation_set_structure; | |
+---------------------+-------------------+ | |
| variation_set_super | variation_set_sub | | |
+---------------------+-------------------+ | |
| 11 | 1 | | |
| 11 | 2 | | |
| 11 | 3 | | |
| 12 | 4 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use 5.14.0; | |
use warnings; | |
use autodie qw(:all); | |
use DBI; | |
my $dsn = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i=0 | |
while read -r file; do | |
if (( i++ >= 3 )); then | |
wait $jobpid | |
fi | |
base=${file/*rnaseq\//} | |
echo $base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env perl | |
use strict; | |
use warnings; | |
use Bio::EnsEMBL::Registry; | |
## Notes | |
## See this blog post (compile and make Tabix!): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP PROCEDURE IF EXISTS test.QueryTablesByName; | |
DELIMITER // | |
CREATE DEFINER=`ensrw`@`%` PROCEDURE `QueryTablesByName`( | |
tableName VARCHAR(255), | |
query TEXT | |
) | |
BEGIN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP PROCEDURE IF EXISTS test.RunQueryByDatabaseQuery; | |
DELIMITER // | |
CREATE DEFINER=`ensrw`@`%` PROCEDURE `RunQueryByDatabaseQuery`( | |
myQuery TEXT, | |
databaseQuery TEXT | |
) | |
BEGIN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
die "pass a fasta and a vcf\n" | |
unless @ARGV == 2; | |
my $fsa = $ARGV[0]; | |
my $vcf = $ARGV[1]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql-staging-2-ensrw hordeum_vulgare_core_30_83_2 -Ne ' | |
SELECT CONCAT(">", name, char(10), sequence) | |
FROM temp_name INNER JOIN seq_region USING (name) | |
INNER JOIN dna USING (seq_region_id)' \ | |
> Data/Hv_IBSC_PGSB_v2/bac_assemblies/morex.fasta | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Bio::EnsEMBL::Registry; | |
Bio::EnsEMBL::Registry-> | |
load_registry_from_db( | |
-host => 'mysql-eg-prod-3.ebi.ac.uk', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> SELECT COUNT(DISTINCT species_set_id) | |
FROM plantsx INNER JOIN species_set USING (genome_db_id) | |
INNER JOIN method_link_species_set USING (species_set_id) WHERE method_link_id = 401 | |
GROUP BY method_link_id; | |
+--------------------------------+ | |
| COUNT(DISTINCT species_set_id) | | |
+--------------------------------+ | |
| 43 | | |
+--------------------------------+ | |
1 row in set (0.01 sec) |