Reputation: 1693
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
Upvotes: 0
Views: 511
Reputation: 27632
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
Upvotes: 1
Reputation: 34657
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
Upvotes: 0