Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
content badge
swh:1:cnt:35aa37239f97a1aab2e93986d07d5922b6b898d1

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
using CSV, DataFrames, Statistics, Bootstrap

# processing data for feeding comparison
cd(joinpath(ENV["HOME"], "Dropbox", "KillifishFeederPaper_AndrewMcKay","Revision", "Code", "GitHub","Fig2"))
raw = DataFrame(CSV.File("Input/Figure2-SourceData3_feedingdata_auto_manual.csv"))
# rename for easier working
raw = rename(raw, "Scaled_to_one_manual_feeding_at_target_20mg" => "ScaledFeed")

dfperson = raw[raw[:Type] .== "Person",:]
dfpreciseperson = raw[raw[:Accuracy] .== "PrecisePerson",:]
dffeeder = raw[raw[:Type] .== "Feeder",:]
dffeeder1 = raw[raw[:Feeder] .== "Feeder4",:]
# seems like dfmean should be here somewhere?
dfmeans = by(raw, :Accuracy, :ScaledFeed => mean)

# fraction deviation
dfperson[:deviation] = (dfperson[:ScaledFeed] .- dfmeans[dfmeans[:Accuracy] .== "Person", :ScaledFeed_mean]) ./ dfmeans[dfmeans[:Accuracy] .== "Person", :ScaledFeed_mean]

dfpreciseperson[:deviation] = (dfpreciseperson[:ScaledFeed] .- dfmeans[dfmeans[:Accuracy] .== "PrecisePerson", :ScaledFeed_mean]) ./ dfmeans[dfmeans[:Accuracy] .== "PrecisePerson", :ScaledFeed_mean]

dffeeder[:deviation] = (dffeeder[:ScaledFeed] .- dfmeans[dfmeans[:Accuracy] .== "Feeder", :ScaledFeed_mean]) ./ dfmeans[dfmeans[:Accuracy] .== "Feeder", :ScaledFeed_mean]

dffeeder1[:deviation] = (dffeeder1[:ScaledFeed] .- dfmeans[dfmeans[:Accuracy] .== "Feeder", :ScaledFeed_mean]) ./  dfmeans[dfmeans[:Accuracy] .== "Feeder", :ScaledFeed_mean]

dfperson[:category] = "Multiple People"
dfpreciseperson[:category] = "Single Person"
dffeeder[:category] = "Automatic Feeder"
dffeeder1[:category] = "Single Automatic Feeder"

# this has more rows than original (duplicates) but is intentional because will only plot later
raw = vcat(dfperson, dffeeder, dfpreciseperson, dffeeder1)

# plot out deviations
CSV.write("Input/rawdeviations_percent.csv", raw)


# creating dataframe for moving to R
n_boot = 10000
df = by(raw, [:category], p -> bootstrap(std, Array(p.ScaledFeed), BasicSampling(n_boot)))
df[:std_est] = map(p -> p.t0[1], df[:x1])
df[:std_error] = map(p -> stderror(p)[1], df[:x1])
df[:count] = map(p -> size(p.data)[1], df[:x1])
df[:precision] = map(p -> (1/(p^2)), df[:std_est])
df[:conf] = map(p -> confint(p[:x1], BasicConfInt(0.68))[1], eachrow(df))
df[:precision_conf] = map(p -> map(pp -> (1/(pp^2)), p), df[:conf])

# since we can't transport bootstrap sampling type over to R
select!(df, Not(:x1))
dfout = df

CSV.write("Output/FeedingReproducibility2.20.19data5.26.20.csv", dfout)
df2 = copy(dfout)
df2 = df[:, [:category]]
x = [[x[1] x[2] x[3]] for x in dfout[:precision_conf]]
x = vcat(x...)
df2[:precision] = x[:,1]
df2[:upper] = x[:,2]
df2[:lower] = x[:,3]
CSV.write("Output/precision_confint.csv", df2)

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API