Skip to content

Commit

Permalink
codecreatede
Browse files Browse the repository at this point in the history
complete package ready for submission to golang packages except for the graphics additions.
  • Loading branch information
Gaurav Sablok committed Sep 16, 2024
1 parent 4e1a3dd commit ab40241
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ func main() {
mRNADet := []mRNADetails{}
for annotateRead.Scan() {
line := annotateRead.Text()
for i := range annotateID {
id := strings.Split(string(strings.Split(strings.HasPrefix(string(line), "Parent"), ",")[0]), "=")[1]
if annotateID[i].geneID == id && strings.Split(line, "\t")[2] == "mRNA" {
mRNADet = append(mRNADet, mRNADetails{
Expand All @@ -94,11 +95,13 @@ func main() {
mRNAEnd: strings.Split(string(line), "\t")[5],
})
}
}
}

exonDet := []exonDetails{}
for annotateRead.Scan() {
line := annotateRead.Text()
for i := range annotateID {
id := strings.Split(string(strings.Split(strings.HasPrefix(string(line), "Parent"), ",")[0]), "=")[1]
if annotateID[i].geneID == id && strings.Split(line, "\t")[2] == "exon" {
exonDet = append(exonDet, exonDetails{
Expand All @@ -107,11 +110,13 @@ func main() {
exonEnd: strings.Split(string(line), "\t")[5],
})
}
}
}

cdsDet := []cdsDetails{}
for annotateRead.Scan() {
line := annotateRead.Text()
for i := range annotateID {
id := strings.Split(string(strings.Split(strings.HasPrefix(string(line), "Parent"), ",")[0]), "=")[1]
if annotateID[i].geneID == id && strings.Split(line, "\t")[2] == "CDS" {
cdsDet = append(cdsDet, cdsDetails{
Expand All @@ -120,11 +125,12 @@ func main() {
cdsEnd: strings.Split(string(line), "\t")[5],
})
}
}
}
proteinDet := []proteinDetails{}
for annotateRead.Scan() {
for i := range annotateID {
line := annotateRead.Text()
for i := range annotateID {
id := strings.Split(string(strings.Split(strings.HasPrefix(string(line), "Parent"), ",")[0]), "=")[1]
if annotateID[i].geneID == id && strings.Split(line, "\t")[2] == "protein" {
proteinDet = append(proteinDet, proteinDetails{
Expand All @@ -138,8 +144,8 @@ func main() {

fiveDet := []fiveDetails{}
for annotateRead.Scan() {
for i := range annotateID {
line := annotateRead.Text()
for i := range annotateID {
id := strings.Split(string(strings.Split(strings.HasPrefix(string(line), "Parent"), ",")[0]), "=")[1]
if annotateID[i].geneID == id && strings.Split(line, "\t")[2] == "five_prime_UTR" {
fiveDet = append(fiveDet, fiveDetails{
Expand All @@ -153,8 +159,8 @@ func main() {

threeDet := []threeDetails{}
for annotateRead.Scan() {
for i := range annotateID {
line := annotateRead.Text()
for i := range annotateID {
id := strings.Split(string(strings.Split(strings.HasPrefix(string(line), "Parent"), ",")[0]), "=")[1]
if annotateID[i].geneID == id && strings.Split(line, "\t")[2] == "three_prime_UTR" {
threeDet = append(threeDet, threeDetails{
Expand All @@ -164,7 +170,7 @@ func main() {
})
}
}

}
// plotting features to add using the go graphics package for tomorrow
}
}

0 comments on commit ab40241

Please sign in to comment.