https://github.com/arjunrajlaboratory/RajLabSeqTools
Raw File
Tip revision: c8b8c79b2ec9c1bd9eb7ced427bb2aec25f19506 authored by Benjamin Emert on 26 March 2020, 17:37:11 UTC
Updated reorganizeBasespaceFiles.py to better parse samples with same first index (e.g. sample 1 and sample10)
Tip revision: c8b8c79
meltHTSeqData.pl
#!/usr/bin/perl

# run from within repo directory.
# takes relative paths from the repo directory as arguments.

use File::Spec;

print "experiment\tsampleID\tgene_id\tcounts\n";

while (@ARGV) {
	$fullPath = shift @ARGV;
	($volume,$directories,$file) = File::Spec->splitpath($fullPath);

	@dirs = File::Spec->splitdir($directories);

	$experiment = shift @dirs;
	shift @dirs;
	$sampleID = shift @dirs;

	open FILE, "< $fullPath";

	for (<FILE>) {
		print "$experiment\t$sampleID\t";
		print;
	}
}
back to top