Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Python Examples for Perl programmers

  1. Example: empty dictionary, add values to it
    Code Block
            layer = {}
            layer["type"] = row[1]
            layer["status"] = row[2]
            layer["name"] = row[3]
            layer["numSamples"] = row[4]
            layer["platform"] = row[5]
            layer["version"] = row[6]
            layer["qcBy"] = row[11]
    
  2. Example: create a populated dictionary
    Code Block
    CSV_TO_PRIMARY_FIELDS = {
        'name': 'name',
        'description': 'description',
        'Investigator': 'creator',
        'Creation Date': 'creationDate',
        'Status': 'status',
        'date_released': 'releaseDate',
        'version':'version'
        }
  3. Example: empty array, add values to it
    Code Block
    
       
    stringAnnotations = []
        stringAnnotations.append("foo")
    
  4. Example: create a populated array
    Code Block
    CSV_SKIP_FIELDS = ["db_id","user_agreement_file_path", "readme_file_path"];
    

...