Added the possibility to use standard input as input for sequence

datasets
This commit is contained in:
Celine Mercier
2016-02-22 15:29:22 +01:00
parent 0c4c37d5ab
commit d44eca19ce

View File

@ -223,7 +223,13 @@ fastaSeqCount seq_readAllSeq2(char *fileName, BOOL isStandardSeq, BOOL onlyATGC)
fastaSeqCount allseqs;
int32_t discarded=0;
if ((fileName == NULL) || (strcmp(fileName, "-") == 0))
fp = stdin;
else
{
fp = file_open(fileName, TRUE);
exitIfEmptyFile(fp);
}
if (fp == NULL)
{
@ -231,8 +237,6 @@ fastaSeqCount seq_readAllSeq2(char *fileName, BOOL isStandardSeq, BOOL onlyATGC)
exit(1);
}
exitIfEmptyFile(fp);
seqPtrAr = (fastaSeqPtr) util_malloc(slots*sizeof(fastaSeq), __FILE__, __LINE__);
seqPtr = seq_getNext(fp, " ", isStandardSeq, onlyATGC);