Question

I have some very large files, and a server with not a lot of space, plus it takes so much time to unzip these files so I was hoping to use zcat as input to a function?

What I've been using is

$ zcat file1 | samtools view -bS > outputfile

file1 is the zipped file, and the outputfile is obviously the output of the view function in samtools. The input to samtools usually goes between the -bS and the >

What I have above isn't working, any help? Thanks

Était-ce utile?

La solution

You may need to give "-" as argument to samtools, to get it to read from standard input instead of a file:

zcat file1 | samtools view -bS - > outputfile

Autres conseils

Are the files zipped or GZipped? If the former, zcat won't do the task. You'll need unzip instead, with the following syntax:

unzip -p file1 | samtools view -bS - > outputfile
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top