Documentation ¶
Index ¶
- Constants
- Variables
- func GeoSearchSuggestions(samplesMetadata *SamplesMetadata) error
- func IsInput(path string) bool
- func IsR1(path string) bool
- func IsR2(path string) bool
- func SamplesFromDir(directory string, verbose bool) (map[string]SampleFiles, error)
- func StripLaneNumber(path string) string
- func ToSampleName(path string) string
- func UploadSamplesFlow(sampleFiles map[string]SampleFiles, stringMetadata map[string]string, ...) error
- type Client
- func (c *Client) CreateSamples(projectID int, sampleFiles map[string]SampleFiles, ...) ([]createSamplesResSample, error)
- func (c *Client) GetGeoSearchSuggestion(queryStr string, isHuman bool) (GeoSearchSuggestion, error)
- func (c *Client) GetMetadataForHostGenome(hostGenome string) ([]MetadataField, error)
- func (c *Client) GetProjectID(projectName string) (int, error)
- func (c *Client) GetTemplateCSV(sampleNames []string, hostGenome string) (*csv.Reader, error)
- func (c *Client) GetUploadCredentials(sampleID int) (aws.Credentials, error)
- func (c *Client) MarkSampleUploaded(sampleId int, sampleName string) error
- func (c *Client) ValidateSampleNames(sampleNames []string, projectID int) ([]string, error)
- func (c *Client) ValidateSamplesMetadata(projectID int, samplesMetadata SamplesMetadata) error
- type CreateSamplesReqSample
- type Example
- type GeoSearchSuggestion
- type GetGeoSearchSuggestionReq
- type HTTPClient
- type Metadata
- type MetadataField
- type SampleFiles
- type SampleOptions
- type SamplesMetadata
- type UploadInfo
Constants ¶
View Source
const ( FASTQFileType inputFileType = "fastq" PrimerBedFileType inputFileType = "primer_bed" ReferenceSequenceFileType inputFileType = "reference_sequence" )
Variables ¶
View Source
var DefaultClient = &Client{ auth0: auth0.DefaultClient, httpClient: http.DefaultClient, }
Functions ¶
func GeoSearchSuggestions ¶
func GeoSearchSuggestions(samplesMetadata *SamplesMetadata) error
func SamplesFromDir ¶
func SamplesFromDir(directory string, verbose bool) (map[string]SampleFiles, error)
func StripLaneNumber ¶
func ToSampleName ¶
func UploadSamplesFlow ¶
func UploadSamplesFlow( sampleFiles map[string]SampleFiles, stringMetadata map[string]string, projectName string, metadataCSVPath string, workflow string, sampleOptions SampleOptions, disableBuffer bool, ) error
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateSamples ¶
func (c *Client) CreateSamples( projectID int, sampleFiles map[string]SampleFiles, samplesMetadata SamplesMetadata, workflow string, sampleOptions SampleOptions, ) ([]createSamplesResSample, error)
CreateSamples creates samples on the back end and returns the necessary information to upload their files
func (*Client) GetGeoSearchSuggestion ¶
func (c *Client) GetGeoSearchSuggestion(queryStr string, isHuman bool) (GeoSearchSuggestion, error)
func (*Client) GetMetadataForHostGenome ¶
func (c *Client) GetMetadataForHostGenome(hostGenome string) ([]MetadataField, error)
func (*Client) GetTemplateCSV ¶
func (*Client) GetUploadCredentials ¶
func (c *Client) GetUploadCredentials(sampleID int) (aws.Credentials, error)
func (*Client) MarkSampleUploaded ¶
func (*Client) ValidateSampleNames ¶
func (*Client) ValidateSamplesMetadata ¶
func (c *Client) ValidateSamplesMetadata(projectID int, samplesMetadata SamplesMetadata) error
type CreateSamplesReqSample ¶
type CreateSamplesReqSample struct { HostGenomeName string `json:"host_genome_name"` InputFileAttributes []createSamplesReqInputFile `json:"input_files_attributes"` Name string `json:"name"` ProjectID int `json:"project_id"` Status string `json:"status"` Workflows []string `json:"workflows"` Technology string `json:"technology"` WetlabProtocol string `json:"wetlab_protocol"` MedakaModel *string `json:"medaka_model,omitempty"` ClearLabs *bool `json:"clearlabs,omitempty"` ReferenceAccession *string `json:"accession_id,omitempty"` ReferenceFasta *string `json:"ref_fasta,omitempty"` PrimerBed *string `json:"primer_bed,omitempty"` }
type GeoSearchSuggestion ¶
type GeoSearchSuggestion struct { Name string `json:"name"` GeoLevel string `json:"geo_level"` CountryName string `json:"country_name"` StateName string `json:"state_name"` SubdivisionName string `json:"subdivision_name"` CityName string `json:"city_name"` // Lat float64 `json:"lat"` // Lng float64 `json:"lng"` CountryCode string `json:"country_code"` }
func (GeoSearchSuggestion) String ¶
func (g GeoSearchSuggestion) String() string
type GetGeoSearchSuggestionReq ¶
type GetGeoSearchSuggestionReq struct{}
type HTTPClient ¶
HTTPClient interface
type Metadata ¶
type Metadata struct { HostGenome string CollectionLocation GeoSearchSuggestion // contains filtered or unexported fields }
func NewMetadata ¶
func (Metadata) MarshalJSON ¶
type MetadataField ¶
type SampleFiles ¶
type SampleOptions ¶
type SamplesMetadata ¶
func CSVMetadata ¶
func CSVMetadata(csvpath string) (SamplesMetadata, error)
func GetCombinedMetadata ¶
func GetCombinedMetadata(sampleFiles map[string]SampleFiles, stringMetadata map[string]string, metadataCSVPath string) (SamplesMetadata, error)
GetCombinedMetadata parses the metadata CSV, validates it, then fuses it with flag-based metadata
type UploadInfo ¶
type UploadInfo struct { MultipartUploadId *string `json:"multipart_upload_id"` S3Path string `json:"s3_path"` }
UploadInfo stores the data necessary to upload a file to s3
Click to show internal directories.
Click to hide internal directories.