PCAP::SRA(3)

  Methods

new
     my $sra = PCAP::SRA->new($options->{'raw_files'});
      # or when library type is not encoded in BAM headers
     my $sra = PCAP::SRA->new($options->{'raw_files'}, $options->{'library_type'});

    Create object and pre validate the input data.

populate_detail
    Additional final checking of data structures, intent is to use this to generate tab output of most of the fields for the tracking spreadsheet (once finalised).

validate_grouped_data
    Validates the input information via other methods, just plumbing.

validate_control
    Checks that the control/normal sample doesn't change within a donor.

parse_input
    Takes a list of files and converts into basic bam detail structure.

get_md5_from_file
    Pulls pre-calculated MD5 from file co-located with BAM as *.md5

experiment_sets
    Generates the EXPERIMENT_SET component of experiment.xml

experiment
    Generates the EXPERIMENT block for experiment.xml

sample_descriptor
    Generates the SAMPLE_DESCRIPTOR block for experiment.xml

run_set
    Generates the RUN_SET block for run.xml

run Generates the RUN block for run.xml and linked EXPERIMENT_REF block

info_file_data
    Adds any data to be added to ANALYSIS_ATTRIBUTES into the 'info' component of the bam_object.

    Data is pulled from bam header @CO field or alternatively from a *.info file co-located with the *.bam

analysis_xml
    Generates the full analysis.xml content.

analysis_attributes
    Generates ANALYSIS_ATTRIBUTES block of analysis.xml

analysis_run_xml
    Generates the RUN XML element for analysis.xml

file_xml
    Generates the FILE XML element which is used in both analysis.xml and run.xml.

group_bams
    Group bam files by seq type, sample, library.

validate_seq_type
    Checks sequencing type is of expected format/type.

uuid
    Creates a lower-case uuid (GNOS preference)

create_cv_lookups
    Loads the pre-determined look up files for CV terms.

validate_info
    Checks any fields in the info block that match the name of CV terms against the valid values.

generate_sample_SRA
    Generates a set of submission files for each of the grouped bams. During processing also validates any fields known to have controlled vocab.

analysis_xml
    Generates the analysis.xml file content.

    Takes list of values in this order

      bam object (with info prepopulated)
      study_name
      aliquot_id from BAM RG header SM tag

bash_script
    Takes output path and list of submission UUIDs.

    Generates a bash script that can be run to complete GNOS upload with resume capabilities.