Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix get haplo #6

Open
wants to merge 2 commits into
base: v2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions bin/getHaplo_PE_cgOnly.pl
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ sub main{
readCGTable($ARGV[1]);
my $bamfile = $ARGV[0];
my $start_time = time;
my $TEMP_PREFIX2 = $ARGV[2];
my ($last_list_pos, $last_list_calls, $last_id, $last_chr) = ("NA", "NA", "NA", "NA");
open(INFILE, "$samtools sort -n -O SAM $bamfile |") || die("Error running samtools to convert BAM file\n");
open(INFILE, "$samtools sort -T $TEMP_PREFIX2 -@ 4 -n -O SAM $bamfile |") || die("Error running samtools to convert BAM file\n");
while(my $line = <INFILE>){
next if($line =~ m/^@/);
chomp($line);
Expand Down Expand Up @@ -249,7 +250,7 @@ sub getAlignmentInfo{

sub printUsage{
print " Usage: \n";
print " getHaplo_PE_cgOnly.pl [cpg position list] < [sam file sorted by name] \n";
print " getHaplo_PE_cgOnly.pl [cpg position list] [sam file sorted by name] [temp_prefix]\n";
exit 0;
}

Expand Down