Skip to content

Commit

Permalink
Postgrad publications (#353)
Browse files Browse the repository at this point in the history
* Add publication to postgrad #352

* Add postgrad students to API

* Use email as the key #352

* Manual update of the PG research

---------

Co-authored-by: Nuwan Jaliyagoda <[email protected]>
  • Loading branch information
ishanfdo18098 and NuwanJ-RhinoPartners authored Oct 17, 2023
1 parent 7b45b6a commit ca3112c
Show file tree
Hide file tree
Showing 4 changed files with 249 additions and 21 deletions.
180 changes: 180 additions & 0 deletions _data/postgraduate_publications.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
{
"[email protected]": [
{
"title": "DeepSelectNet: deep neural network based selective sequencing for oxford nanopore sequencing",
"venue": "BMC bioinformatics",
"year": "2023",
"abstract": "",
"authors": [
"Anjana Senanayake",
"Hasindu Gamaarachchi",
"Damayanthi Herath",
"Roshan Ragel"
],
"author_info": [
{
"name": "Anjana Senanayake",
"profile": "https://people.ce.pdn.ac.lk/students/postgraduate/SMAJSenanayake/",
"type": "STUDENT",
"id": "",
"email": "[email protected]",
"profile_image": "https://people.ce.pdn.ac.lk/images/students/postgraduate/SMAJSenanayake.jpg",
"profile_url": "https://people.ce.pdn.ac.lk/students/postgraduate/SMAJSenanayake/"
},
{
"name": "Hasindu Gamaarachchi",
"profile": "#",
"type": "OUTSIDER",
"id": "",
"email": "[email protected]",
"profile_image": "https://people.ce.pdn.ac.lk/images/staff/fellows/hasindu-gamaarachchi.jpg",
"profile_url": "https://au.linkedin.com/in/hasindugamaarachchi"
},
{
"name": "Damayanthi Herath",
"profile": "https://people.ce.pdn.ac.lk/staff/academic/damayanthi-herath/",
"type": "STAFF",
"id": "damayanthiherath",
"email": "[email protected]",
"profile_image": "https://people.ce.pdn.ac.lk/images/staff/academic-staff/damayanthi-herath.jpg",
"profile_url": "https://people.ce.pdn.ac.lk/staff/academic/damayanthi-herath/"
},
{
"name": "Roshan Ragel",
"profile": "https://people.ce.pdn.ac.lk/staff/academic/roshan-ragel/",
"type": "STAFF",
"id": "roshanr",
"email": "[email protected]",
"profile_image": "https://people.ce.pdn.ac.lk/images/staff/academic-staff/roshan-ragel.jpg",
"profile_url": "https://people.ce.pdn.ac.lk/staff/academic/roshan-ragel/"
}
],
"doi": "https://doi.org/10.1186/s12859-023-05151-0",
"is_dept_affiliated": true,
"preprint_url": "#",
"pdf_url": "https://doi.org/10.1186/s12859-023-05151-0",
"presentation_url": "#",
"project_url": "#",
"codebase": "https://github.com/AnjanaSenanayake/DeepSelectNet",
"research_groups": ["Computational BioEngineering"],
"tags": [],
"funding": "",
"api_url": "https://api.ce.pdn.ac.lk/publications/v1/10.1186/s12859-023-05151-0/",
"edit_url": "https://github.com/cepdnaclk/api.ce.pdn.ac.lk/blob/main/publications/v1/10.1186/s12859-023-05151-0/index.json",
"submitted": "2023/03/08 07:53:25"
},
{
"title": "Genopo: a nanopore sequencing analysis toolkit for portable Android devices",
"venue": "Communications Biology",
"year": "2020",
"abstract": "",
"authors": [
"Hiruna Samarakoon",
"Sanoj Punchihewa",
"Anjana Senanayake",
"Jillian M. Hammond",
"Igor Stevanovski",
"James M. Ferguson",
"Roshan Ragel",
"Hasindu Gamaarachchi",
"Ira W. Deveson"
],
"author_info": [
{
"name": "Hiruna Samarakoon",
"profile": "https://people.ce.pdn.ac.lk/students/e14/302/",
"type": "STUDENT",
"id": "E/14/302",
"email": "[email protected]",
"profile_image": "https://people.ce.pdn.ac.lk/images/students/e14/e14302.jpg",
"profile_url": "https://people.ce.pdn.ac.lk/students/e14/302/"
},
{
"name": "Sanoj Punchihewa",
"profile": "https://people.ce.pdn.ac.lk/students/e14/262/",
"type": "STUDENT",
"id": "E/14/262",
"email": "[email protected]",
"profile_image": "https://people.ce.pdn.ac.lk/images/students/e14/e14262.jpg",
"profile_url": "https://people.ce.pdn.ac.lk/students/e14/262/"
},
{
"name": "Anjana Senanayake",
"profile": "https://people.ce.pdn.ac.lk/students/postgraduate/SMAJSenanayake/",
"type": "STUDENT",
"id": "",
"email": "[email protected]",
"profile_image": "https://people.ce.pdn.ac.lk/images/students/postgraduate/SMAJSenanayake.jpg",
"profile_url": "https://people.ce.pdn.ac.lk/students/postgraduate/SMAJSenanayake/"
},
{
"name": "Jillian M. Hammond",
"profile": "#",
"type": "OUTSIDER",
"id": "",
"email": "",
"profile_image": "#",
"profile_url": "#"
},
{
"name": "Igor Stevanovski",
"profile": "#",
"type": "OUTSIDER",
"id": "",
"email": "",
"profile_image": "#",
"profile_url": "#"
},
{
"name": "James M. Ferguson",
"profile": "#",
"type": "OUTSIDER",
"id": "",
"email": "",
"profile_image": "#",
"profile_url": "#"
},
{
"name": "Roshan Ragel",
"profile": "https://people.ce.pdn.ac.lk/staff/academic/roshan-ragel/",
"type": "STAFF",
"id": "roshanr",
"email": "[email protected]",
"profile_image": "https://people.ce.pdn.ac.lk/images/staff/academic-staff/roshan-ragel.jpg",
"profile_url": "https://people.ce.pdn.ac.lk/staff/academic/roshan-ragel/"
},
{
"name": "Hasindu Gamaarachchi",
"profile": "#",
"type": "OUTSIDER",
"id": "",
"email": "[email protected]",
"profile_image": "https://people.ce.pdn.ac.lk/images/staff/fellows/hasindu-gamaarachchi.jpg",
"profile_url": "https://au.linkedin.com/in/hasindugamaarachchi"
},
{
"name": "Ira W. Deveson",
"profile": "#",
"type": "OUTSIDER",
"id": "",
"email": "",
"profile_image": "#",
"profile_url": "#"
}
],
"doi": "https://doi.org/10.1038/s42003-020-01270-z",
"is_dept_affiliated": true,
"preprint_url": "#",
"pdf_url": "https://www.nature.com/articles/s42003-020-01270-z.pdf",
"presentation_url": "#",
"project_url": "#",
"codebase": "#",
"research_groups": ["Computational BioEngineering"],
"tags": ["Genopo", "Nanopore Sequencing"],
"funding": "MRFF grant APP1173594 (to I.W.D.), Cancer Institute NSW Early Career Fellowship 2018/ECF013 (to I.W.D.) and philanthropic support from The Kinghorn Foundation (to I.W.D. and H.G.).",
"api_url": "https://api.ce.pdn.ac.lk/publications/v1/10.1038/s42003-020-01270-z/",
"edit_url": "https://github.com/cepdnaclk/api.ce.pdn.ac.lk/blob/main/publications/v1/10.1038/s42003-020-01270-z/index.json",
"submitted": "2022/05/24 23:14:25"
}
]
}
50 changes: 45 additions & 5 deletions _layouts/postgraduateDetails.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ site.home }}" class="link-light">Home</a></li>
<li class="breadcrumb-item"><a href="{{ '/' | relative_url }}" class="link-light">People</a></li>
<li class="breadcrumb-item"><a href="{{ '/students/postgraduate/' | relative_url }}" class="link-light">Postgraduate Students</a></li>
<li class="breadcrumb-item"><a href="{{ '/students/postgraduate/' | relative_url }}"
class="link-light">Postgraduate Students</a></li>
<li class="breadcrumb-item text-white">
{{page.name_with_initials}}
</li>
Expand All @@ -56,9 +57,11 @@
Image
{%- endcomment -%}
{% if page.image_url %}
<img src="{{ page.image_url | relative_url}}" alt="image" style="border-radius: 10%" width="250">
<img src="{{ page.image_url | relative_url}}" alt="image" style="border-radius: 10%"
width="250">
{% else %}
<img src="{{ 'images/students/default.jpg' | relative_url}}" alt="image" style="border-radius: 10%" width="175">
<img src="{{ 'images/students/default.jpg' | relative_url}}" alt="image"
style="border-radius: 10%" width="175">
{% endif %}

<div class="mt-2">
Expand All @@ -78,7 +81,8 @@ <h4>
<li class="list-group-item d-flex justify-content-between align-items-center flex-wrap">
<h6 class="mb-0"> <i class="fas fa-globe"></i> Website</h6>
{% if page.url_website %}
<span class="text-secondary"> <a href="{{page.url_website}}" target="_blank"><button type="button" class="btn btn-outline-primary btn-sm">View</button></a></span>
<span class="text-secondary"> <a href="{{page.url_website}}" target="_blank"><button
type="button" class="btn btn-outline-primary btn-sm">View</button></a></span>
{% else %}
<span class="text-secondary"> N/A</span>
{% endif %}
Expand Down Expand Up @@ -167,7 +171,43 @@ <h6 class="mb-0"> <i class="fas fa-globe"></i> Website</h6>
{% endif %}
</div>
</div>

<!-- Publications -->
{%- assign publications = site.data.postgraduate_publications[page.email] -%}
{%- assign pub_count = publications | size -%}
{% if pub_count > 0 %}
<div class="card mt-3">
<div class="card-header" style="font-weight: 500">Publications</div>
<div class="card-body mx-2 p-3">
<div class="row px-3">
<ul>
{%- for p in publications -%}
<li>
{%- include publicationCard.html data=p title=p.title path=page.path -%}
</li>
{%- endfor -%}
</ul>

</div>
<div class="row">
<hr>
<p class="text-muted small">
Please note that here only contain the <i>'Publications'</i> affiliated with the
<i>Department of Computer Engineering</i>. To see the full publication profile, visit the
{%- if page.url_researchgate -%}
<span> <a href="{{ page.url_researchgate }}" target="_blank">ResearchGate</a> </span>
{%- else -%}
<span> ResearchGate </span>
{%- endif -%} or Google Scholar profile of the student.
</p>
</div>
</div>
</div>
{%- endif -%}

<br>
<br>
{{content}}
</div>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion api/students.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ Information from the older batches will not consider for the API due to lack of
{% for student in student_list -%}
{%- include api_student.html student=student -%}{% if forloop.last %}{% else %},{% endif %}
{% endfor -%}
}
}
38 changes: 23 additions & 15 deletions python_scripts/update_publications.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@
url = "https://api.ce.pdn.ac.lk/publications/v1/filter/students/index.json"
r = requests.get(url)

if r.status_code==200:
if r.status_code == 200:
# it is available
stud_pub = json.loads(r.text)

filename = "../_data/student_publications.json"
os.makedirs(os.path.dirname(filename), exist_ok=True)
with open(filename, "w") as f:
f.write(json.dumps(stud_pub, indent = 4))
f.write(json.dumps(stud_pub, indent=4))
print("Student: Success")
else:
print("Student: Failed")

except:
print('parse failed; ' + url)
print("parse failed; " + url)

# Get staff publications
try:
url = "https://api.ce.pdn.ac.lk/publications/v1/filter/staff/index.json"
r = requests.get(url)

if r.status_code==200:
if r.status_code == 200:
# it is available
staff_pub = json.loads(r.text)
staff_pub_year = {}
Expand All @@ -42,40 +42,48 @@
pub_count = 0
year_count = 0

if staff not in staff_pub_year: staff_pub_year[staff]= {
"publication_count": 0, "year_count": 0, "publications": {}
}
if staff not in staff_pub_year:
staff_pub_year[staff] = {
"publication_count": 0,
"year_count": 0,
"publications": {},
}

for pub in staff_pub[staff]:
pub_count += 1
year = pub['year']
year = pub["year"]

if year not in staff_pub_year[staff]["publications"]: staff_pub_year[staff]["publications"][year] = []
if year not in staff_pub_year[staff]["publications"]:
staff_pub_year[staff]["publications"][year] = []
staff_pub_year[staff]["publications"][year].append(pub)

staff_pub_year[staff]['publication_count'] = pub_count
staff_pub_year[staff]['year_count'] = len(staff_pub_year[staff]["publications"])
staff_pub_year[staff]["publication_count"] = pub_count
staff_pub_year[staff]["year_count"] = len(
staff_pub_year[staff]["publications"]
)

# Sort the publications by year
for staff in staff_pub:
publications = staff_pub_year[staff]['publications']
publications = staff_pub_year[staff]["publications"]
publications_sorted = {}
for key in sorted(publications, reverse=True):
# print "%s: %s" % (key, mydict[key])
publications_sorted[key] = publications[key]

staff_pub_year[staff]['publications'] = publications_sorted
staff_pub_year[staff]["publications"] = publications_sorted

# Write into the file
filename = "../_data/staff_publications.json"
os.makedirs(os.path.dirname(filename), exist_ok=True)
with open(filename, "w") as f:
f.write(json.dumps(staff_pub_year, indent = 4))
f.write(json.dumps(staff_pub_year, indent=4))

print("Staff: Success")

else:
print("Staff: Failed")

except:
print('parse failed; ' + url)
print("parse failed; " + url)

# PG Students will be updated and managed manually

0 comments on commit ca3112c

Please sign in to comment.