Skip to content
Snippets Groups Projects
Commit 1e05fa1a authored by Veronique Legrand's avatar Veronique Legrand
Browse files

first stuff

parents
No related branches found
No related tags found
No related merge requests found
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(rock, 1.0)
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE()
AC_PROG_CC
AC_CONFIG_FILES(Makefile src/Makefile)
AC_OUTPUT
bin_PROGRAMS=rock
bin_SOURCES=rock.c
/*
============================================================================
Name : rock.c
Author : Véronique Legrand
Version :
Copyright : Your copyright notice
Description : Hello World in C, Ansi-style
============================================================================
*/
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
int main(void) {
/* 1rst step : read a fastq and compute quality score for each record (PE or single) */
char * fq_pe1="../data/LM201200065_S106_R1.TM.fq";
char * fq_pe2="../data/LM201200065_S106_R2.TM.fq";
char * fq_s="../data/LM201200065_S106_RS.TM.fq";
size_t bufsize=10240;
char buf[bufsize];
mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
/* Let's start with the easiest case : single reads. */
int f_single=open(fq_s,O_RDONLY,mode);
/* for each read, we want : offset, filenb, total quality score. */
int nread=read(f_single,buf,bufsize);
while (nread!=0) {
nread=read(f_single,buf,bufsize);
printf("%s",buf);
}
close(f_single);
return EXIT_SUCCESS;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment