-
Notifications
You must be signed in to change notification settings - Fork 0
/
accession.go
53 lines (45 loc) · 1.56 KB
/
accession.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package sra
import (
"fmt"
"time"
)
type AccessionRecord struct {
Status string
Updated time.Time
Published time.Time
Received time.Time
Type string
Visibility string
Experiment string
Sample string
Study string
MD5 string
BioSample string
BioProject string
Alias string
Issues string
SubmissionId string
}
func (ar AccessionRecord) String() string {
status := fmt.Sprintf("Status : %s\n", ar.Status)
updated := fmt.Sprintf("Updated : %s\n",
ar.Updated.Format("2006-01-02T15:04:05Z"))
published := fmt.Sprintf("Published : %s\n",
ar.Published.Format("2006-01-02T15:04:05Z"))
received := fmt.Sprintf("Received : %s\n",
ar.Received.Format("2006-01-02T15:04:05Z"))
sratype := fmt.Sprintf("Type : %s\n", ar.Type)
submissionId := fmt.Sprintf("SubmissionID : %s\n", ar.Type)
visibility := fmt.Sprintf("Visibility : %s\n", ar.Visibility)
experiment := fmt.Sprintf("Experiment : %s\n", ar.Experiment)
sample := fmt.Sprintf("Sample : %s\n", ar.Sample)
study := fmt.Sprintf("Study : %s\n", ar.Study)
md5 := fmt.Sprintf("MD5 : %s\n", ar.MD5)
biosample := fmt.Sprintf("BioSample : %s\n", ar.BioSample)
bioproject := fmt.Sprintf("BioProject : %s\n", ar.BioProject)
alias := fmt.Sprintf("Alias : %s\n", ar.Alias)
issues := fmt.Sprintf("Issues : %s\n", ar.Issues)
return submissionId + alias + status + sratype + issues + updated +
published + received + visibility + study + bioproject + sample +
biosample + experiment + md5
}