Skip to content

Loading script #6

Description

@davidonlaptop

Write a script that loads all data fetched from the previous scripts.

Script input parameters:

  • samples
  • populations
  • superpopulations
  • sequences
  • alignments
  • files

Script output (TSV Format):

  • none

Particular behavior

  • The script should use the database configuration file (see Database configuration file #5).
  • The script should create the database if it does not exists
  • The script should create the tables only if they do not exists
  • If data exists, the tables should be TRUNCATED.
  • One table is created for each of the 6 CSV files
  • Additionally, these 2 tables are created (in-memory join mapping required):
    • sample_sequences : join table between the sequences table (for in memory join, use sample_name + fastq_filename) and the files table
    • sample_alignments : join table between the alignments table (for in memory join, use bam_filename) and the files table

Example

Example of how this script could be called:

./load-mysql.sh samples.csv populations.csv superpopulations.csv sequences.csv alignments.csv files.csv 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions