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

Revision e6a0334445b5755bb52a0d2209120ee4e251e7b4 authored by Joao Sollari Lopes on 13 November 2017, 18:32:56 UTC, committed by Joao Sollari Lopes on 13 November 2017, 18:32:56 UTC
First commit
0 parent
  • Files
  • Changes
  • af1b4d8
  • /
  • src
  • /
  • pop_makestats.c
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.

  • revision
  • directory
  • content
revision badge
swh:1:rev:e6a0334445b5755bb52a0d2209120ee4e251e7b4
directory badge
swh:1:dir:a574a6b710136758a352d12c14eaa4a6f2cefb24
content badge
swh:1:cnt:db57162a00a9ca3efe3bfa5f0b24d16554e06ccc

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.

  • revision
  • directory
  • content
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
pop_makestats.c
/*
	@author:	joao lopes
	@workplace: Reading University
	@date: 		13th November 2008
*/
#include "interface.h"
					 
int makestats(char *output,int *lsstats){
	FILE *out_sst;	//pntr to .sst
	int cstat;		//iterators
	char *sst_name;				//name of the output file

	sst_name = malloc((5+strlen(output))*sizeof(char));
	strcpy(sst_name,output);
	out_sst = fopen(strcat(sst_name,".sst"),"w");
	if(out_sst == NULL)
		return 1; //couldn't create .sst file

	/*write the .sst file*/
	for(cstat=0; cstat<MAXSSTATS; cstat++){
		switch(cstat){
		case 0:
		fprintf(out_sst," Microsatellites data:\n");
		fprintf(out_sst," -heterozygosity                #%d\n",lsstats[cstat]);
		break;
		case 1:
		fprintf(out_sst," -variance of alleles length    #%d\n",lsstats[cstat]);
		break;
		case 2:
		fprintf(out_sst," -number of alleles             #%d\n",lsstats[cstat]);
		break;
		case 3:
		fprintf(out_sst," -curtosis of alleles length    #%d\n",lsstats[cstat]);
		break;
		case 4:
		fprintf(out_sst," -Shanon's index                #%d\n",lsstats[cstat]);
		break;
		case 5:
		fprintf(out_sst," -Nm estimator based on H       #%d\n",lsstats[cstat]);
		break;
		case 6:
		fprintf(out_sst,"\n Sequence data:\n");
		fprintf(out_sst," -mean of pairwise differences  #%d\n",lsstats[cstat]);
		break;
		case 7:
		fprintf(out_sst," -number of segregating sites   #%d\n",lsstats[cstat]);
		break;
		case 8:
		fprintf(out_sst," -number of haplotypes          #%d\n",lsstats[cstat]);
		break;
		case 9:
		fprintf(out_sst," -Shanon's index                #%d\n",lsstats[cstat]);
		break;
		case 10:
		fprintf(out_sst," -mean of MFS                   #%d\n",lsstats[cstat]);
		break;
		case 11:
		fprintf(out_sst," -stdev of MFS                  #%d\n",lsstats[cstat]);
		break;
		case 12:
		fprintf(out_sst," -Nm estimator based on S       #%d\n",lsstats[cstat]);
		break;
		case 13:
		fprintf(out_sst," -private segregating sites     #%d\n",lsstats[cstat]);
		break;
		case 14:
		fprintf(out_sst," -S(1)                          #%d\n",lsstats[cstat]);
		break;
		}
	}

	/*free stuff*/
	free(sst_name);
	
	/*close files*/
	fclose(out_sst);

	return 0;

} //end of main
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2026, 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