Inhaltsverzeichnis

BioCASe Transfer from DC to BioCASe MySQL DB

FIXME

server
ganapti/ganesh
script
/home/biocase/transfer/Transfer2/transfer_data.py
database schema
DBSchema
git
gitlab@fredie.eu/BioCASe/biocase_media.git
GBOL
BioCASe queries

Software Package

DOI
https://doi.org/10.20363/zfmk-app.vcat-transfer-mapping_version_9
Tag
https://fredie.eu/gitlab/BioCASe/biocase_media/tags/mapping_version_9

Shortcuts in puTTY unter byobu

Mehr Infos unter: https://wiki.ubuntuusers.de/byobu/

Usage

Login into zfmk.datacenter.de using putty or ssh:

Vorbereitung

cd /home/biocase/transfer/Transfer2
source bin/activate

Die Befehle zum Transfer immer in Fenster 0 (work) ausführen

ggf. zuvor deaktivieren (quasi ausloggen):

deactivate

Transfer one single project

python Transfer.py -p 656

Die Nummer hinter p ist die ID des Projektes (hier: ZFMK-Opiliones), das übertragen werden soll. Diese kann man auch in Projects auslesen.

Transfer all projects into BioCASe

python Transfer.py -s

Vergleich der Versionsnummern

python Transfer.py -v

Hilfe für Transfer-Script

python Transfer.py -h

Monitor progress/Log-files:

less log/transfer.log

Ausführen der Warteschlange

python T_Queue.py

Inhalt der Warteschlange

python T_Queue.py -l

Löschen der Warteschlange

python T_Queue.py -q

Hilfe für Warteschlange

python T_Queue.py -h

Die beiden Skripte Transfer und Queue interagieren miteinander: Transfer stellt die Befehle zum transferiern, Archiv erzeugen usw. in die Warteschlange. Die Warteschlange wird regelmäßig aufgerufen und arbeitet die Befehle ab.

Die Warteschlange wird alle 5 Minuten aufgerufen, muss also nur gestartet werden, wenn etwas schiefläuft (also z.B. kein Archiv erstellt wurde).

Auflisten der Projektnummern (Obereinheiten)

python Transfer.py -a

Transfer Policies

Specimen
accession number is not empty, withholding reason empty, transaction not embargo
Identification
only the first one
Agents
withholding reason empty
Event
withholding reason empty
Media
only images with creator and license type fields filled out

Development

Development Environment:

sudo mount /var/svzfmkfs02 
sudo mkdir /var/www/biocase/biocase_media
python Transfer.py -c 707 -r -n

Test:  ll /mnt/svzfmkfs02//CollDig/Coll_Oberthuer_CollDig/CollOberthuer_Kaesteninhalt/Ob0099.jpg

in fstab: 


//131.220.75.247/Resources /var/svzfmkfs02 cifs credentials=/home/mdb_smb/.smbcredentials,uid=1001,gid=100,port=8067,file_mode=0664,dir_mode=0775,noauto,iocharset=utf8 0       0

ToDo

Relations

Nach Transfer:

  1. Füge ALLE Unit-IDs (=Acc-Nos) + AccessPoint + Collection in ZFMK_BioCASE_Data.Registry ein
  2. Suche für alle Einträge in CollectionSpecimenRelation mit dem RelatedSpecimenDisplayText (=Acc. No des targets) in der Registry die Unit-ID, den AccessPoint und die Collection raus und füge sie ein
    • Gehe durch ALLE DSAs und aktualiesiere die Relations mit Schritt 2!

Beispiel BGBM

<abcd21:Associations>
	<abcd21:UnitAssociation>
		<abcd21:SourceInstitutionCode>MfN</abcd21:SourceInstitutionCode>
		<abcd21:SourceName>Mollusc Collection</abcd21:SourceName>
		<abcd21:UnitID>119736</abcd21:UnitID>
		<abcd21:AssociationType>same in situ individual</abcd21:AssociationType>
		<abcd21:DatasetAccessPoint>http://ww3.bgbm.org/biocase/pywrapper.cgi?dsa=GGBN_MfN_specimens</abcd21:DatasetAccessPoint>
	</abcd21:UnitAssociation>
</abcd21:Associations>

Tests

CollectionSpecimen 19
IdentificationUnits 30
Identifications 35
SpecimenParts 31
IdentificationUnits_in_Parts 41
Specimen images 6
IdentificationUnitAnalysis 5
Barcodes 2
Preview Type Acc-No Col Spec. ID Event IdentificationUnit1 Identification1 IdentificationUnit2 Identification2 SpecimenPart1 SpecimenPart2 Transaction GBOL-Barcode Measurements Internal Relation External Relation Annotation
GBOL KR-M-0028821 - Barcoding 95 31662 28773 x x x x x x
Mammalia MAM 2016-0587-t Measurements 224079503 610384 x x x x x
Coleoptera Ob-0100-t - Insect Box - 11 families 223977534 x x x x x x
Ichtyology Test-0981 - Geographic region 223850707 365856 x x
Coleoptera ZFMK-COL 3489134-s 100428137 127106 x x x x x
Biobank ZFMK-DNA-12927-t 223950737 65061 x x x x
Hymenoptera ZFMK-HET 10002287 100428131 x x x Sammelgenehmigung
Hymenoptera ZFMK-HOM 20001243 - 2 Subparts 10000737 35880 x x x x
General ZFMK-MAM 19130186-t - Internal Relation 1b 223746247 44482 x x x x 223746248
General ZFMK-MAM 19130195-t - Internal Relation 1a 223746248 44482 x x x 223746247 x
Mammalia ZFMK-MAM 19790138-t 223746249 53617 x x x x Permit
Mammalia ZFMK-MAM 20080222 223849502 363926 x x x x
General ZFMK-MAM 223746244-t 223746244 52026 x x x x x: specimen: 223946097, identification unit: 223746246, part: 223746245
General ZFMK-MAM 223746245-t 223746245 305354 x x x x 223746244
General ZFMK-MAM 223746246-t 223746246 293835 x x x x x 223746244
General ZFMK-MAM 223946097-t 223946097 52026 x x x x 223746244
GBOL ZFMK-TIS-12498-t 224074730 608013 x x x x
GBOL ZFMK-TIS-1307-t Dataset GBOL w/o Barcode 223891263 67299 x x x x
GBOL ZFMK-TIS-223865258-t 223865258 x x x x